delivered tbe opinion of tbe Court.
The petition of appeal, filed in this cause, presents but two questions which are material to be considered by this Court, viz: 1st, the propriety of retaining the bill after the prayer for a specific performance had been refused, and? 2d, the correctness of the data upon which the compensation or damages were ordered to be assessed.
It was insisted for the appellants, that whenever a bill is filed asking for the specific performance of a contract or agreement, if the Court should find that the prayer could not be granted upon the pleadings and proofs in the cause, the jurisdiction of equity terminated and the bill should be dismissed. It was further insisted, that compensation could not be decreed when specific performance is denied. As a general rule, the doctrine contended for is undoubtedly correct and was maintained with marked ability by Justice Thompson in the ojfinion delivered in the case of Lewis and wife vs. Yale, (4 Flo. Reports, 437;) but it is-only as a general rule that it can be said to be the establish od doctrine of the equity Courts. There are exceptional cases, and whenever a clear equity is found to have arisen between the parties to the contract, growing out of its peculiar character or nature, there can he no doubt that the Chancellor is authorized to retain the bill for the purpose of having that equity properly adjusted. — 2 Story's Eq. Ju., § 714, § 796; 1 Cowan’s Reports, 711; 1 McCord’s Ch. R., 112; 2 Vesey, Sr., 243.
The case of Parkhurst vs. Van Cortland (1 Johnson’s Ch. Reps., 286,) is full to the point, and recognizes the existence of these exceptional cases. We are satisfied that tbe circumstances of this case, as disclosed by the record, constitutes it one of tbe exceptional class and brings it within the principles of the authorities above cited. It is ma-ni*409fest that a specific performance could not have been decreed even if the defendant Glinski had not parted with the title to the lot, and it is equally manifest that equities had grown up between the parties in the nature of a partnership, arising out of the mutual contribution to the erection of the buildings upon the lot, which ^required the adjustment of a Court of Equity. That there was some agreement between Glinski and Zawadski for the sale and purchase of the lot is quite apparent, but its precise terms are left in much doubt and uncertainty, even where resort is had to the bill and answer to ascertain them. It was altogether a loose transaction, entered, into in a spirit of confiding friendship, and unfortunately resulted, as such transactions not unfrequently do, in a disruption of the friendly relations of the parties. ¥e think, then, that the Chancellor acted correctly in retaining the bill and in ordering an account to be taken as a basis for the decree to be rendered.
This brings us to the consideration of the second point noted, viz: The data that should form the basis of the account upon which the damages are to bo predicated. It was insisted, for the appellants that the “ 'value ” of the premises at the date of its sale under the foreclosure of the mortgage to Gilliland, and not the amounts contributed by the complainants Zawadski and wife for improvements, should form the basis of the account, and we think there is much reason for this position. It will not be pretended that the complainant Zawadski was blameless as to the controversy growing out of the agreement for the sale and purchase of the property. Ho was certainly an equal actor and participant in this most unwise and improvident contract, and, after he had entered into it, he was the first to make a failure by declaring his inability to erect the building and to make the improvements originally contem*410plated, and it was at bis solicitation, that tbe defendant Glinsld was induced to invest bis money in tbe enterprize. It would be a dangerous rule to adopt, in cases of this bind, to make tbe amount of expenditures tbe criterion of compensation to. be allowed. A careless or extravagant man might make a very improvident application of tbe money expended in permanent and lasting improvements, and it would be unjust to visit bis improvidence upon tbe other party. Tbe better rule would seem to be to allow compensation only for the actual value of tbe improvements, or, at farthest, a reasonable allowance therefor, and in this view we are supported by tbe adjudicated cases.— Vide Parkhurt vs. Van Cortland, 1 John. Ch. Reps., 286.
Tbe order of reference to the Master must be reformed and made to conform to this rule.
Tbe rights of Gilliland, tbe mortgagee, are not presented by any one of tbe exceptions contained in tbe petition of appeal. It is tbe established rule of this Court that all exceptions to tbe decree of tbe Chancellor must be set forth in tbe petition which brings tbe case up; nor will tbe Court, except as matter of grace, consider or permit an argument to be made upon any other points than those thus presented. Such favor, touching tbe interests of tbe mortgagee, was accorded in tbe argument of this cause, and his rights were prominently presented for our consideration. It was insisted in his behalf that be stood before tbe Court as a purchaser without notice and for a valuable consideration, and that bis title, obtained as tbe purchaser under the sale upon tbe foreclosure of tbe mortgage, was not affected by any prior equities existing between tbe complainants and tbe mortgagor. It is undoubtedly correct, as a general proposition, that a bona fide purchaser for value will not be affected by any prior existing equities of which he bad no notice at the time of *411his purchase. The authorities in support of this doctrine are quite full. It is laid down in Coote on Mortgages, (227,) “That the lien of a covenantee for the settlement of an estate will be postponed to that of a subsequent legal mortgagee of the estate.” And, in Sugden on Vendors, it is said: “ If one agree to purchase an estate and take a contract or covenant that the owner will sell that estate, and the latter should sell or mortgage it to another person, who has no notice, the first purchaser has not any right to call on the second purchaser for the legal estate, but the latter may protect himself by the legal estate against the former.” — Vide 1 Sug. on Vend., 191, citing 8 Price, 488-9; 2 Har. & John., 55, Dennison vs. Robinett; 1 John. Ch. Reps., 298, Frost vs. Beekman; 1 Car. Law Reports, 508, Benizen vs. Lerroir.
Indeed there would seem to be no controversy on the point, and that the doctrine is well established. It then becomes our duty to enquire if Gilliland, the mortgagee, occupies the position of a bona fide purchaser for value. As to his character as “ purchaser,” it has been ruled by this Court that a mortgagee is to be considered in the light of a purchaser. — Gibson vs. Love, 4 Flo. Reps., 232. With respect to notice, it is also fully established that he had no notice, either actual or constructive, of the lien of the complainants at the time that he took the mortgage from Glinski, the then holder of the legal title to the lot in controversy. But was he such a purchaser for valtie as is contemplated in the authorities above cited, and such an one as would be protected against the prior equities of the complainants ? As between parties situated as these are, it will be found that when the cases speak of a purchaser/^ value they mean to designate one who gives a present consideration for the transfer, and not one who bases his title upon a pre-existing debt. The distinction here noted will *412be found to be abundantly sustained by the decided cases, and we think that it is based upon sound equitable principles. The mortgagee obtained only an equitable interest in the property mortgaged, and unless an actual consideration (as the payment of money at the time, or the giving up of a security,) be the moving cause for the execution of the deed, there seems to be no sound reason why his mere equity should override and postpone the prior equities of other parties. The maxim of “ Que prior in tempore potior est injure” is eminently applicable to parties standing in this relation. — Thompson vs. Hale, 6 Pick. R., 259; Bay vs. Coddington, 5 John. Ch. R., 56; Stalker vs. McDonald, 6 Hill’s R., 93; Clark vs. Ely, 2 Saund. Ch. R., 166; Bradley vs. Calvin, 4 Barb. S. C. R., 304; Done vs. Shutt, 2 Denio R., 621; 16 Georgia R., 471; 3 Edward’s Ch. R., 182; Manningford vs. Toleman, 1 Collyer’s Reps., 670; Becket vs. Correlly, 1 Bro. C. C., 353; Tourville vs. Naish, 3 Peer Wms., 308.
/Applying these principles to the facts of this case and it will be seen, that Gilliland, in taking the mortgage from Glinski, took it coupled with a trust for those having prior equities, amongst whom were the complainants. In the joint answer of Gilliland and Glinski, the latter, in response to the eighth interrogatory in the bill, says: “ They (Gilliland and others) had advanced cash for me to take up my notes, which fell due in the Bank of. Charleston, which notes had originally been given for materials and other things about said premises.” By reference to the deed of mortgage, a copy of which is contained in the record as an exhibit in the cause, it will be made fully to appear that it was given to secure antecedent debts. It is not pretended that any new or present consideration was given for it, or that any prior security was given up. Gilliland, the mortgagee, by having his lien postponed to the *413prior equities of the complainants, will stand in no worse position as to security for his debt than he was in at the time of accepting the mortgage from Glinski./ '
Let the decree of the Chancellor, in so far as it conflicts with the views expressed in this opinion, he reversed and set aside, and let the cause he remanded for such further proceedings in the premises as may he conformable to these views. The costs of this appeal to he paid by the appellees.