
31 P.3d 607 (2001)
2001 UT App 247
HOMESIDE LENDING, INC., a Florida corporation, Appellant and Cross-Appellee,
v.
Charles M. MILLER; Kathy L. Miller; and Transworld Systems, Inc., dba Credit Management Services of Colorado, a California corporation, Appellees and Cross-Appellants.
No. 991056-CA.
Court of Appeals of Utah.
August 16, 2001.
*609 Bruce A. Maak, Parr Waddoups Brown Gee Loveless, Salt Lake City, for Appellant.
Mona Lyman Burton, McKay Burton & Thurman and Richard C. Terry, Cobridge Baird & Christensen, Salt Lake City, for Appellees.
Before Judges GREENWOOD, DAVIS, and THORNE.

OPINION
THORNE, Judge:
¶ 1 Appellant Homeside Lending, Inc. (Homeside) and cross-appellants Charles and Kathy Miller (the Millers), appeal from the trial court's Judgment Determining Priority and Extent of Liens in Real Property. We affirm in part and reverse in part.

BACKGROUND
¶ 2 In 1982, the Millers entered into a uniform real estate contract with Commercial Security Bank (CSB) to purchase a parcel of real estate (the Property). The original amount of the real estate contract was $61,364, which included a previously existing trust deed in favor of First Security Bank for $58,380.41. As part of the contract, the Millers and CSB entered into an Escrow Agreement with Security Title Company, wherein CSB deposited a warranty deed for the Property into escrow. Security Title Company agreed to deliver the deed to the Millers after they had paid for the Property.
¶ 3 In November 1991, Transworld Systems, Inc. (Transworld) obtained a judgment against the Millers for approximately $35,000, plus accruing interest. Also in November 1991, the Millers executed a declaration of homestead on the Property. Approximately thirty days later, the Millers filed a Chapter 7 Bankruptcy Petition seeking a discharge on their debts, including the Transworld judgment. In December 1991, the bankruptcy court granted the Millers' petition and discharged their debts. Transworld's judgment lien against the Property, however, remained in effect.
¶ 4 In 1997, the Millers approached Academy Mortgage (Academy) seeking to refinance the Property. At the time of refinance, the Property was subject to three encumbrances: (1) a trust deed lien in favor of Mellon Mortgage for approximately $45,000; (2) the CSB real estate contract for approximately $13,000; and (3) Transworld's judgment lien for approximately $35,000. Academy enlisted Associated Title to conduct a title search on the Property. Associated Title's preliminary title commitment to Academy showed Transworld's judgment lien against the Property. As a result, Associated Title contacted Transworld to obtain information on a payoff of Transworld's judgment lien. Transworld provided Associated Title with the information.
¶ 5 Following the discovery of Transworld's judgment lien, Academy requested that the Millers provide Academy copies of their bankruptcy documents. The Millers provided Academy the documents, and Academy forwarded the documents to Associated Title. Subsequently, Associated Title concluded that Transworld's judgment lien on the Property was discharged.
¶ 6 Academy closed the Miller loan through Associated Title, and the Millers provided Academy with a promissory note and a trust deed on the Property. Academy later assigned the trust deed to Homeside. Associated Title disbursed the loan funds to satisfy the Mellon Mortgage and CSB liens, and paid the balance of the proceeds to the Millers. Associated Title distributed no funds to Transworld.
¶ 7 Believing that its judgment lien against the Property had priority over Homeside's trust deed, Transworld scheduled a sheriff's sale of the Property. In response, Homeside filed a complaint against Transworld and the Millers, seeking an injunction staying the sheriff's sale and an order declaring Homeside's trust deed superior to Transworld's judgment lien. Also in its complaint, Homeside alleged that the Millers were obligated *610 to indemnify Homeside and satisfy Transworld's judgment lien because the Millers signed a trust deed.
¶ 8 Transworld answered Homeside's complaint and filed a counterclaim seeking (1) an order declaring its judgment lien superior to Homeside's trust deed, and (2) an order authorizing Transworld to foreclose its judgment lien against the Property. The Millers also answered Homeside's complaint, arguing that their homestead exemption was superior to Transworld's judgment lien, and that they were not obligated to indemnify Homeside.
¶ 9 On March 8, 1999, the trial court held a hearing on Homeside's Motion for Preliminary Injunction. On November 12, 1999, the trial court entered its judgment. In relevant part, the trial court concluded that (1) "Homeside's interest [in the Property] was created through a refinance and not as a result of a purchase money transaction;" (2) "[Transworld's] judgment lien interest intervened between the purchase money interest created in 1982 and Homeside's interest created in 1997;" (3) "the doctrine of circularity of liens should apply;" and (4) the $14,226 received by the Millers from the Academy refinance constituted a portion of their homestead exemption. Finally, the trial court assigned the following lien priorities: (i) the Millers' homestead exemption for $5,774; (ii) Transworld's judgment lien of $35,250.96, plus simple interest; (iii) Homeside's trust deed; and (iv) the remainder of the Millers' homestead exemption amounting to $20,000. This appeal followed.

ISSUES AND STANDARDS OF REVIEW
¶ 10 Homeside argues the trial court erred in determining that the trust deed, assigned to Homeside by Academy, was not a purchase money mortgage. Next, Homeside argues the trial court erred in determining, under the circularity of liens doctrine, that Transworld's judgment lien has priority over Homeside's trust deed.
¶ 11 In the present matter, the parties have stipulated that there are no disputed questions of fact. Accordingly, we afford the trial court's legal conclusions no particular deference, but review them for correctness. See Lefavi v. Bertoch, 2000 UT App 5, ¶¶ 14-15, 994 P.2d 817; Rotta v. Hawk, 756 P.2d 713, 714 (Utah Ct.App.1988).
¶ 12 Homeside also argues the trial court erred in determining that Homeside's "actual knowledge of the Judgment of Transworld" precludes application of the equitable subrogation doctrine. "[I]n an equity action, we review the trial court's legal conclusions under a correction-of-error standard according those conclusions no particular deference." Englert v. Zane, 848 P.2d 165, 168 (Utah Ct.App.1993).
¶ 13 Finally, the Millers argue the trial court erred in determining that the $14,226 paid to them by Academy constituted a portion of the Millers' statutory homestead exemption. Further, the parties are at odds as to whether the 1999 legislative enactments to the Utah Exemption Act, Utah Code Ann. § 78-23-3(2) to (3) (1999), apply to the present matter. We review matters of statutory interpretation for correctness. See Green v. Turner, 2000 UT 54, ¶ 5, 4 P.3d 789.

ANALYSIS

A. Purchase Money Mortgage
¶ 14 Homeside argues that the trust deed is a purchase money mortgage, which provides Homeside priority over Transworld's pre-existing judgment lien. We disagree. In determining the existence of a purchase money mortgage, our supreme court has explained:
"The real test is not whether the deed and mortgage were in fact executed at the same instant, or even on the same day, but whether they were parts of one continuous transaction, and so intended to be, so that the two instruments should be given contemporaneous operation in order to promote the intent of the parties."
Nelson v. Stoker, 669 P.2d 390, 395 (Utah 1983) (citation omitted).
¶ 15 In the present matter, Homeside's refinancing agreement with the Millers is clearly not "`part[ ] of one continuous transaction,'" wherein the Millers used the funds to purchase an interest in the Property. Id. (citation omitted). The Millers purchased *611 their interest in the Property in 1982, when they entered into the real estate contract with CSB. Further, they did not acquire a new interest in the Property through the refinance. Accordingly, the trial court correctly determined that "Homeside's interest was created through a refinance and not as a result of a purchase money transaction," being neither a part of the original purchase nor an acquisition of a new interest.

B. Circularity of Liens
¶ 16 Next, Homeside argues the trial court erred in its application of the circularity of liens doctrine, maintaining that Homeside's trust deed should be given priority over Transworld's judgment lien as well as the Millers' homestead exemption. Circularity of liens occurs when lienholder "A is ahead of B, B is ahead of C, and C is ahead of A." Kingsberry Mort. Co. v. Maddox, 13 Ohio Misc. 98, 233 N.E.2d 887, 891 (1968). To resolve such problems, courts generally look to equitable principles. See id. at 892. However, we need not look to those equitable principles to resolve this portion of the dispute.
¶ 17 In Utah, generally, "[p]riority determines the order in which liens against property are satisfied."[1] 55 Am.Jur.2d Mortgages § 307 (1996) (footnote omitted); see, e.g., Nelson, 669 P.2d at 396. "Normally, competing interests in land have priority in order of their creation in point of time, following the general rule . . . first in time, superior in right . . . ." Id. (footnote omitted); see, e.g., Nelson, 669 P.2d at 396; Bank of Ephraim v. Davis, 559 P.2d 538, 539-41 (Utah 1977). Applying this general rule, Transworld's judgment lien, being first in time, is superior in right to Homeside's trust deed.
¶ 18 However, this does not end our analysis because the Millers have declared a homestead exemption related to the sheriff's sale of the Property. In pertinent part, Utah Code Ann. § 78-23-3 (Supp.2000), the Homestead Act, states:
2(a) An individual is entitled to a homestead exemption consisting of property in this state in an amount not exceeding:
. . . .
(b) If the property claimed as exempt is jointly owned, each joint owner is entitled to a homestead exemption; however
. . . .
(ii) [t]he maximum exemption may not exceed $40,000 per household.
Id. § 78-23-3(2) to (3).[2] The Homestead Act affects the pool of proceeds from which Transworld and Homeside may recover resulting from the sale of the Property.
¶ 19 What this means is that upon the sale of the Property and receipt of the proceeds therefrom, Transworld, occupying first position, is entitled to recoup from those proceeds, to the extent available, the sum necessary to satisfy its judgment lien. However, because of the Millers' declaration of a homestead exemption on the Property, see id. § 78-23-3, Transworld, as a judicial lienholder, is only entitled to receive those proceeds that do not impair the Millers' homestead exemption. See id. § 78-23-3(3) (stating "[a] homestead is exempt from judicial lien"). Accordingly, because Transworld has first priority, Transworld shall be first in line to receive from available proceeds of the sale in order to satisfy its judgment lien, excepting Transworld may not recover from that amount protected by the Millers' declaration of homestead.
¶ 20 Next in line to receive proceeds from the sale should be Homeside, occupying second position, as a consensual lienholder.[3]*612 Homeside, due to the consensual nature of its loan agreement with the Millers, may recoup from any of the remaining proceeds of the sale to satisfy its trust deed, including those proceeds the Millers may otherwise protect from judicial lienholders pursuant to the Homestead Act. See id. § 78-23-3(3)(d) (stating "[a] homestead is exempt from judicial lien and from levy execution, or forced sale except for . . . consensual liens obtained on debts created by mutual contract").
¶ 21 In sum, we reverse the trial court's decision finding circularity and the priorities established therefrom, and allocate the respective claims of the parties as set forth in this opinion.

C. Equitable Subrogation
¶ 22 Homeside also argues that the trial court erred by not applying the equitable subrogation doctrine. We disagree. "Subrogation is an equitable doctrine and is governed by equitable principles." Hill v. State Farm Mut. Auto. Ins. Co., 765 P.2d 864, 866 (Utah 1988). However, "[e]quity will not correct a mistake of law as to the legal effects of an agreement unconnected with a mistake of fact, or fraud, or imposition, or undue advantage." Justus v. Clelland, 133 Ariz. 381, 651 P.2d 1206, 1208 (Ariz.Ct.App.1982); see also Gillmor v. Gillmor, 596 P.2d 645, 646-47 (Utah 1979) (stating "[u]nless some principle in equity, such as fraud, mistake, and the like, demands otherwise, the leases should stand as written"); Harmston v. Harmston, 680 P.2d 751, 752 n. 1 (Utah 1984) (stating "[i]t is acknowledged that a deed may be set aside in equity as argued by plaintiff, but that is only where the grantor has been induced by fraud or undue influence").
¶ 23 In the present matter, the only error was an incorrect assessment of the legal status of Transworld's judgment lien that was identified during the title search. As such, no mistake of fact or fraud occurred, and therefore, it would be inappropriate to apply equitable principles to modify or rearrange lien priorities.

D. The Millers' Homestead Exemption and the 1999 Legislative Enactments to the Homestead Act
¶ 24 The Millers argue the trial court erred when it determined that the $14,226 they received from Academy was a portion of the Millers' "statutory $20,000 homestead exemption." Further, the parties are at odds as to whether the 1999 legislative enactments to the Homestead Act, increasing the Millers' exemption to $40,000, apply to this matter. We address these issues in the order presented.
¶ 25 First, we review matters of statutory interpretation for correctness. See Green, 2000 UT 54 at ¶ 5, 4 P.3d 789. Second, the rules of statutory construction require us to look "first to the plain language of the statute . . . and [to] assume[ ] that each term was used advisedly by the [L]egislature." Biddle v. Washington Terrace City, 1999 UT 110, ¶ 14, 993 P.2d 875. Finally, we interpret the "`terms of a statute . . . as a comprehensive whole and not in piecemeal fashion.'" Business Aviation of S. Dakota, Inc. v. Medivest, Inc., 882 P.2d 662, 665 (Utah 1994) (citation omitted).

1. The Funds from the Millers' 1997 Refinance Agreement
¶ 26 The Millers argue that the funds they received from their 1997 refinancing agreement with Academy should not be included as a portion of their homestead exemption. We agree. In relevant part, section 78-23-3 states:
The proceeds of any sale, to the amount of the exemption existing at the time of sale, are exempt from levy, execution, or other process for one year after the receipt of the proceeds by the person entitled to the exemption.
Utah Code Ann. § 78-23-3(5)(b) (Supp. 2000).[4]
¶ 27 A plain language reading of section 78-23-3(5)(b) clearly illustrates that the funds from the exemption are to come from the "proceeds" of the homestead sale. See id. Moreover, assuming, as we must, that the Legislature uses each term in a statute *613 advisedly, see Biddle, 1999 UT 110 at ¶ 14, 993 P.2d 875, and reading section 78-23-3 "as a comprehensive whole," Business Aviation, 882 P.2d at 665, the funds for the exemption derive from the sale of the homestead.
¶ 28 Here, the earlier funds at issue were derived from the refinancing agreement with Academy. Quite simply, the refinance was not tantamount to a sale of the Property.[5] As such, the funds the Millers received from the refinance were not "proceeds of any sale," and therefore, not "exempt from levy, execution, or other process for one year after the receipt of the proceeds by the person entitled to the exemption," which is the thrust of the Homestead Act.[6] Utah Code Ann. § 78-23-3(5)(b). We therefore reverse the trial court's determination that the Millers received a portion of their homestead exemption at the time of the refinance.

2. The Homestead Act's 1999 Legislative Enactments
¶ 29 The trial court concluded that "the 1999 Legislative changes to the Utah Exemption Statute apply to the Millers, and that as a result, they are now entitled to a homestead exemption of $40,000." We reverse and remand.
¶ 30 The plain language of section 78-23-3(5)(b) states: "the amount of the exemption at the time of sale." Id. (emphasis added). Reading this subsection in conjunction with the entire statute, see Business Aviation, 882 P.2d at 665, we conclude that the amount of the exemption that the Millers are entitled to shall be determined by the declaration effective at the time of sale of the Property.
¶ 31 Further, we find the reasoning in Macumber v. Shafer, 96 Wash.2d 568, 637 P.2d 645 (1981), addressing the same issue, persuasive. In Macumber, the appellant obtained an unsecured loan from a bank prior to May 28, 1977. See id. at 645. On May 28, 1977, the Washington Legislature increased the authorized homestead exemption from $10,000 to $20,000. See id. Subsequently, the appellant made a homestead declaration seeking the $20,000 exemption. See id. at 646.
¶ 32 On May 24, 1979, the appellant filed a voluntary petition in bankruptcy, claiming the $20,000 homestead exemption. See id. The bankruptcy trustee, however, limited the appellant's homestead exemption to $10,000, the amount authorized by statute prior to May 28, 1977. See id. The bankruptcy court affirmed the trustee's decision, and the appellant appealed to the federal district court, which certified the case to the Washington Supreme Court. See id.
¶ 33 On appeal, the court explained that "[h]omestead statutes are enacted as a matter of public policy in the interest of humanity and thus are favored in the law and are accorded a liberal construction." Id. Accordingly, the court determined that
First, reservations of certain "essential attributes of sovereign power" must be read into every contract. [Home Bldg. & Loan Ass'n v. Blaisdell, 290 U.S. 398, 435, 54 S.Ct. 231, 78 L.Ed. 413 (1934)]. Thus, by increasing the amount of the homestead exemption in response to increases in the cost of living, the Legislature merely exercised its sovereign power implicitly reserved in the contract. Consequently, the Legislature's action does not constitute an impairment of contract per se.
Second, the increase in the exemption does not impair the contractual obligation. It merely modifies the remedy. An unsecured creditor may still seek judgment against the debtor. The only change is that the amount available to a creditor has been decreased by an additional $10,000.
Id. at 647; but see, Builders Supply Co. v. Pine Belt Sav. & Loan Ass'n, 369 So.2d 743, 745 (Miss.1979) (holding that "any law which *614 materially increases the amount of exempt property withdrawn from liability for the debts of the owner of the property impairs the obligation of existing contracts and is, as to existing creditors, unconstitutional because an exemption may not be applied retroactively").
¶ 34 Accordingly, based upon the principles of statutory interpretation discussed above and the public policy considerations surrounding homestead exemption statutes as articulated in Macumber, we conclude that in supervising the distribution of proceeds from the sale of the Property, the trial court should determine the amount of the homestead exemption based upon the declaration in effect at the time of the actual sale. The trial court's ruling is therefore reversed and remanded in order that a factual finding may be made upon which to base the determination.[7]

CONCLUSION
¶ 35 We conclude the trial court correctly determined that Homeside's trust deed is not a purchase money mortgage, and that equitable subrogation is inapplicable in this matter. Accordingly, we affirm the trial court's decisions regarding these matters.
¶ 36 We reverse the trial court's decisions finding circularity and establishing priorities, and hereby assign the following priorities: (1) Transworld's judgment lien, (2) Homeside's trust deed, and (3) the Millers. The lien and trust deed are each to be satisfied, in turn, to the extent that assets are available to satisfy the claims. We acknowledge that different assets, or a portion thereof, may be available as each succeeding creditor attempts to satisfy their claim because the homestead exemption protects a portion of the proceeds from Transworld's judicial lien. The proceeds from the sale are to be distributed and supervised by the trial court in a manner not inconsistent with our opinion.
¶ 37 We also reverse the trial court's decision that the sum the Millers received from Academy should be considered a portion of the Millers' homestead exemption. Finally, we conclude that the trial court should determine the amount of the homestead exemption based upon the declaration in effect at the time of the actual sale of the Property.
¶ 38 The trial court's decision is affirmed in part and reversed in part.
¶ 39 I CONCUR: PAMELA T. GREENWOOD, Presiding Judge.
DAVIS, Judge (concurring, concurring in result, and dissenting):
¶ 40 I concur in the main opinion respecting the purchase money mortgage and equitable subordination issues. I concur in the result respecting the circularity of liens issue;[1] however, I dissent on the issue of the allowable homestead exemption.
¶ 41 In my view, under the facts of this case, the amount of the allowable homestead exemption was determined at the time of filing and in accordance with the amounts set out in the declaration of homestead.[2] Here, the Millers apparently filed their declaration of homestead shortly after, and probably as a result of, Transworld's judgment. Between the time that the Millers filed their declaration of homestead and the time that this matter was tried, the statutory homestead allowance was increased by the Legislature. Compare Utah Code Ann. § 78-23-3(2) (Supp.2000), with Utah Code Ann. § 78-23-3(1) (1996), and Utah Code Ann. § 78-23-3(1) (1991).
¶ 42 By filing their 1991 declaration of homestead, the Millers were immediately protected from the Transworld judgment lien. "A homestead is exempt from judicial *615 lien and from levy, execution, or forced sale." Utah Code Ann. § 78-23-3(3) (Supp.2000) (emphasis added). The filing of the declaration immediately exempted the amount set out in the declaration from Transworld's lien, regardless of whether a levy, execution, or forced sale ever occurred. Here, the Millers could have waited to declare their homestead exemption up to the date of sale of the property; however, they chose not to. Instead, they elected to immediately exempt the allowable homestead from Transworld's lien.
¶ 43 In order to exempt property from judicial lien, the statute requires the filing of a "signed and acknowledged declaration of homestead." Utah Code Ann. § 78-23-4(1) (1996). The Utah Exemptions Act does not specifically provide for sequential declarations of the homestead exemption. See id. §§ 78-23-1 to-15.
¶ 44 Further, while it is true that the deadline for filing a declaration of homestead is the sale of the property, it is illogical to tie the exemption amount to a sale which may or may not occur. This approach suggests that a sale of the property and generation of the sales' proceeds is a precondition to realization of the homestead by the debtor.
¶ 45 "[T]he purpose of the homestead exemption of Article XXII, Section 1 of the Utah Constitution is to protect the dependent and helpless' and to insure such persons shelter and support free from fear of forced sale." Sanders v. Cassity, 586 P.2d 423, 425 (Utah 1978) (citation omitted).[3] Thus, although the declaration can be filed or served any time prior to sale, see id., the amount of the exemption should not be determined as of the time of sale, because a sale may never take place. See Utah Code Ann. § 78-23-4(5) (1996) ("Property that includes a homestead shall not be sold at execution if there is no bid which exceeds the amount of the declared homestead exemption.").
¶46 In addition, the 1991 declaration gave constructive notice to all interested parties of the scope of Transworld's lien on the real property. To the extent Transworld or other creditors may have relied on the amount stated in the declaration, the Millers should be bound by that amount.
¶ 47 Finally, the Millers cannot rely on the amendments to the exemption amount in Utah Code Ann. § 78-23-3 (Supp.2000) because when statutory amendments are "substantial and substantive," and not merely procedural, then "retroactive application is not appropriate." Thronson v. Thronson, 810 P.2d 428, 432 (Utah App.1991). If the "vested rights" given by a statute have been enlarged, then the amendment cannot be considered procedural. Smith v. Cook, 803 P.2d 788, 792 (Utah, 1990). The changes made by the Legislature to the Utah Exemptions Act since 1991 significantly increase the allowable homestead.[4] Thus, the amendments to the exemption amount in Utah Code Ann. § 78-23-3 (Supp. 2000) are not merely procedural, and "retroactive application is not appropriate." Thronson, 810 P.2d at 432.
¶ 48 Accordingly, I would remand to the trial court for the limited purpose of determining the amount claimed by the Miller's in the 1991 declaration of homestead.
NOTES
[1]  We note that purchase money mortgages have "special priority" over most prior encumbrances, see Nelson, 669 P.2d at 396, but since we have determined that a purchase money mortgage is not involved, we follow the "first in time, superior in right" method of determining priority. 55 Am.Jur.2d Mortgages § 307 (1996).
[2]  We cite to the 2000 provision of the Homestead Act merely to illustrate the workings of the act, and not because the 2000 provision applies to this matter or because the Millers are entitled to a $40,000 homestead exemption.
[3]  As we have previously explained, Homeside occupies second position because its trust deed is second in time to Transworld's judgment lien and it is not a purchase money mortgage.
[4]  For convenience, we cite to the most recent version of section 78-23-3(5)(b).
[5]  Black's Law Dictionary defines refinance as "To finance again or anew; to pay off existing debts with funds secured from a new debt." Black's Law Dictionary 1281 (6th ed.1990).
[6]  "The intention of the [Homestead Act] in giving the homestead claimant the right to claim proceeds of the sale of his homestead as exempt for a period of one year from the receipt thereof is to permit him to acquire another homestead and to pay therefor with such proceeds." Giesy-Walker Co. v. Briggs, 49 Utah 205, 214, 162 P. 876, 879 (1916) (emphasis added).
[7]  We are reluctant to determine the specific amount of the exemption because multiple declarations may be filed before the Property is actually sold. Further, it is more appropriate for the trial court to make the determination because the Millers' original declaration is neither part of the record, nor part of the addenda submitted.
[1]  While I concur in the result regarding the circularity of liens issue, I believe it is unnecessary for this court to address the allocation of proceeds if a sale of the property ever occurs. Once it has been determined that no circularity of liens exists, the rules of priority will control the respective positions of the parties.
[2]  The Miller's actual 1991 declaration of homestead was apparently not made part of the record at trial or on appeal.
[3]  Although the homestead exemption, in general, is to be construed in favor of the debtor, see Russell M. Miller Co. v. Givan, 7 Utah 2d 380, 325 P.2d 908, 909 (1958), this line of cases does not apply here because Homeside, as a result of our decision, effectively succeeds to the Miller's exemption amount.
[4]  Assuming the Millers did not have as many as sixty children in 1991. See, Utah Code Ann. § 78-23-3(1) (1991).
