On the 22nd of January, 1841, Francis L, Cathey, executed a deed to Alexander Graham, of a section of land, to secure the complainant against loss, on account of his liability as the security of the grantor, on two notes ; one for eight hundred and fifty dollars, due the first of January, 1842, the other for eightteen hundred and fifty dollars, due January, 1843.
*564The trustee was authorized L to sell the land, for the purpose of paying those debts, whenever judgment was obtained against the complainant, for the whole, or any part of said debts.
Soon after the execution of this deed, Cathey executed another, conveying the same land, with other property to the same trustee ; for the purpose of securing other debts.— Butin this second deed, the priority of the first is recognized, and the second is made subject to it. Cathey shortly after died, and his estate is declared insolvent: after his death, the trustee, Graham, sold the land under the second deed, and Lea and Townes became the purchasers. The complainant, purchased for $1500, the note of eighteen hundred and fifty dollars, before it became due, and judgment has been recovered against him, for a small balance due on the note of eight hundred and fifty dollars. The object of the bill, was to charge the land with the payment of the note of eighteen hundred and fifty dollars, and also, the amount due on the note of eight hundred and fifty dollars. The chancellor granted the relief sought by the bill, and by his decree, established the right of complainant, and declared the deed executed to Lea and Townes, null and void. He also directed the register, to take an account of the actual amount paid by the complainant, as security of Cathey, as well as the amount still unpaid, on the note of eight hundred and fifty dollars. A final order of [sale was also rendered, and the register ordered to pay over to the complainant, the amount that he should ascertain to be due to him. From this decree, a writ of error was taken to this court. The plaintiff in error contended, that the complainant, by paying off the note of eighteen hundred and fifty dollars, before it fell due, and before judgment could be rendered against him, discharged the lien created by the deed of trust, in his favor, to secure the payment of it.
The object of the deed, was to protect the complainant, against his liability as the security of the grantor. The lien on the land, created for this purpose, is eo nomine dependent on the power to sell; and although the contingency on the happening of which, the trustee was authorized to sell, will never take *565place, yet the deed creates a trust, in favor of the complainant, that a court of equity must enforce for his indemnity.
That the complainant paid this note before its maturity, can in no manner impair his right under the deed; for the very object of the deed, was to protect, and indemnify him from loss against the payment of these debts. To permit the grantor, or those claiming under him, to hold the land discharged from the trust, because the complainant paid the debt before it was due, would be repugnant to every principle of justice and equity. There is, therefore, no error in this portion of the decree, establishing the title of the complainant, and declaring it superior to the title of defendants.
The chancellor, also, in our opinion, laid down the correct rule by which the register was directed to ascertain the amount due to the complainant. The object of the deed was to afford indemnity to the complainant, and nothing more, and having bought, or paid up the debt of eighteen hundred and fifty dollars, before maturity, for less than the actual amount, he cannot claim of his principal, more than he actually paid, with interest.
In decreeing the right of the complainant, to be superior to the title of the defendants, and also in laying down the rules by which the register was to ascertain the extent of that right, or the amount of money due to him, there is no error in the decree. But the chancellor erred in declaring the title of Lea and Townes, to be null and void— By their purchase under the second deed, they acquired the equity of redemption in the premises, and have the right to pay up the amount that may be ascertained to be due to the complainant, and if they do this, they will hold the land discharged of the trust, or if the land be sold, and it brings more than enough to pay the complainant, the amount due to him, and all cost, they will be entitled to the surplus, by virtue of the deed. Their title should, therefore, have been declared subordinate to the right of the complainant, but not null and void.
The final order of sale was also prematurely made. After the equity of a complainant’s bill is settled by the decree, if it is necessary to order a reference to the register, to ascertain the extent of that equity, or the amount due to him, the final or*566■der of sale should, not be made, until the coming in, and confirmation of his report.
It is true that the chancellor may himself ascertain the amount due to the complainant by his decree, if the evidence in the cause enables him to make the correct computation. If he assumes this duty, and does not err in his computation, the decree cannot be reversed. (The Bank v. Strother, decided at this term.) But the usual, and better practice, is, to ■order a reference to the register to ascertain, and report the amount due the complainant; when this is done, unless for some special reason, no order of sale should be made, until the report of the register is made, and confirmed by the chancellor. Then the final order of sale should be made, and the register ordered to pay the amount thus ascertained to be due, to the complainant. For these irregularities, in the form of the decree, it must be reversed — that further proceedings may be had, in conformity with this opinion.