
49 Cal.App.4th 1576 (1996)
LENNAR NORTHEAST PARTNERS, Plaintiff and Respondent,
v.
DeWAYNE A. BUICE as Trustee, etc., et al., Defendants and Appellants. LENNAR NORTHEAST PARTNERS, Plaintiff and Respondent,
v.
TAHOE VISTA INN AND MARINA, Defendant and Appellant.
Docket Nos. C021518, C021956.
Court of Appeals of California, Third District.
October 10, 1996.
*1579 COUNSEL
Miller, Starr & Regalia, Edmund L. Regalia, Chamberlain, Chamberlain & Baldo, Russell Baldo and Thomas C. Thompson for Defendants and Appellants.
Morrison & Foerster and Douglas Hendricks for Plaintiff and Respondent.
OPINION
MORRISON, J.
Tahoe Vista Inn and Marina (TVIM) owns real property located on the shore of Lake Tahoe; the property is encumbered with several deeds of trust. The Buice Revocable Living Trust (the Trust) purchased a promissory note made by TVIM from Bank of America; the note was secured by the senior deed of trust on TVIM's real property. As part of the transaction, the Trust made additional advances to TVIM and amended the note and deed of trust, changing the principal amount, the interest rate, and the maturity date. The trial court found these amendments were a substantial modification which caused the deed of trust to lose its priority. The trial court granted a motion for summary adjudication by Lennar Northeast Partners (Lennar), the holder of what had been the second deed of trust on TVIM's property. A judgment of foreclosure was entered on the deed of trust held by Lennar.
The Trust appeals from this judgment, advancing several arguments to restore the priority of all or most of its lien. It contends the modifications *1580 were not so substantial as to require a change in priorities, or the question of their materiality was a factual one that could not be resolved by summary adjudication. Even if the modifications were substantial, the Trust argues only the modification should be a junior lien. Finally, the Trust asserts equitable subrogation should apply to restore the priority of its lien. We agree that only the modification to the Trust's deed of trust should be a junior lien and so reverse the judgment.

FACTUAL AND PROCEDURAL BACKGROUND
The property in question consists of six rental condominiums, with adjacent docks, parking area, and related facilities, including a restaurant, in Tahoe Vista, California.
In 1983, TVIM's predecessor in interest executed a promissory note in favor of Bank of America. The note provided that principal amounts advanced would not exceed $600,000, and such amounts were payable on demand or on December 21, 1984. The note bore interest of prime plus 2 percent. The note was secured by a deed of trust on the property.
In March 1984, TVIM gave a one-year promissory note for $700,000 to Chesapeake Savings and Loan. This note also was secured by a deed of trust on the property. Both deeds of trust were recorded on April 2, 1984, at 9:35 a.m. The Chesapeake deed of trust stated it was subordinate to the Bank of America deed of trust.
In 1988, TVIM entered into loan workout agreements with Bank of America and Chase Bank of Maryland, Chesapeake's successor. Both agreements extended the due date for the loans until December 31, 1988, changed the interest rate due on the note, and required a second note for unpaid interest. The new interest rate on the Bank of America note was prime plus 3 percent. Bank of America's interest note was in the amount of $126,000; Chase's was $157,802.46. Both workout agreements also required subordination agreements from junior lienholders to assure the same priority of the liens. Chase executed a subordination agreement in favor of the Bank of America deed of trust. The Chase note and deed of trust were amended. Junior lienholders executed subordination agreements.
In 1990, TVIM executed a second deed of trust in favor of Bank of America. This deed of trust stated it was to secure the $600,000 note dated December 21, 1983; the $126,000 note dated March 30, 1988; and a $72,250 note. This deed of trust was never recorded and there is no evidence the $75,250 note was executed. The Trust indicates this deed of trust was part of a second, unsuccessful workout agreement.
*1581 In 1993, the original Bank of America note for $600,000, the second note for $126,000, and the deed of trust were assigned to the Trust. The amendment to the note states the unpaid principal and interest under the note is $934,513.16, and that the Trust has advanced additional funds so the principal balance with interest through May 15, 1994 is $1,075,000. Interest from that date is 12 percent. The due date of the note is December 15, 1994; upon payment of $10,000, the due date can be extended to December 15, 1995.
In May 1994, Chase brought suit for judicial foreclosure and appointment of a receiver, alleging its $700,000 note was in default. TVIM and the Trust were named as defendants.[1] Under the heading "Senior Trust Deed Lien," the complaint alleged the Trust is the holder of a trust deed lien. In the prayer, the complaint asks for an adjudication that the liens of defendants are subsequent and subordinate to Chase's trust deed.
In its answer to the complaint, the Trust asserted as an affirmative defense that it held a promissory note secured by a deed of trust senior to Chase's deed of trust.
Chase nominated Jon Eicholtz as receiver and he was appointed by stipulation. The receiver petitioned for instructions, raising a question as to the priority of the liens. The receiver also requested authorization to market the property at a listing price of $1,800,000. The existing listing had a suggested sales price of $2,950,000, and there had been no valid offers.
Lennar purchased the loan from Chase and substituted into the action as plaintiff. Lennar responded to the receiver's petition contending that the Trust's deed of trust was entirely subordinate to its deed of trust.
The Trust argued it had a valid first lien. It explained that Bank of America's payoff demand was $980,654.27, and $14,849.35 was disbursed to TVIM for improvements and maintenance of the property. The advances made to TVIM for prepaid interest, improvements and maintenance totaled $90,000 and were made according to the terms of the note.
The trial court ruled the Trust's deed of trust no longer had priority because the amendment had substantially changed its terms and materially affected the security of Lennar's lien. The court authorized sale of the property with a listing price of $2,400,000.
*1582 The Trust moved for reconsideration. This motion was denied.
Lennar moved for summary adjudication, contending its note was in default and its deed of trust had priority over the Trust's.
The Trust opposed this motion; it argued the undisputed facts showed the Trust was entitled to summary adjudication. The Trust brought a cross-complaint for judicial foreclosure of its deed of trust, for declaratory relief regarding the priority of the liens, and for injunctive relief to stop Lennar's foreclosure action.
The trial court, with a different judge presiding, granted Lennar's motion for summary adjudication.[2] The court stated it had reviewed all the papers de novo, not relying on the prior ruling, and found the substantial modification of the Trust's deed of trust affected the junior lienholders' security. The court found the secured debt had increased $140,486.84.
The Trust moved for reconsideration, arguing only $140,486.84 of the debt to the Trust should be subordinated to Lennar's deed of trust, and requested an evidentiary hearing.
The parties agreed the issues of the Trust's cross-complaint had been adjudicated; a judgment of foreclosure in favor of Lennar was entered.
The Trust and TVIM appeal. TVIM simply joins in the Trust's arguments.

DISCUSSION

I
(1) In reviewing the propriety of granting a motion for summary judgment or summary adjudication, the first step is to "identify the issues framed by the pleadings since it is these allegations to which the motion must respond...." (AARTS Productions, Inc. v. Crocker National Bank (1986) 179 Cal. App.3d 1061, 1064 [225 Cal. Rptr. 203].) (2) The Trust contends the summary adjudication was improper because the issue of the priority of the liens was not framed by the pleadings. The Trust contends Lennar's complaint sought only judicial foreclosure and appointment of a receiver.
In focusing solely on the description of the two causes of action in Lennar's complaint, the Trust ignores the actual allegations of the complaint *1583 and its answer. The complaint alleges the Trust has a trust deed, and in its prayer asks for adjudication of priorities of the liens. The Trust's answer asserts a senior lien as an affirmative defense. The issue of the priority of the liens was certainly "within the general area of the issues framed by the pleadings." (Mason v. Superior Court (1985) 163 Cal. App.3d 989, 996 [210 Cal. Rptr. 63].) Indeed, an action for judicial foreclosure must establish the relative priority of the lien claimants joined as parties so that any surplus sales proceeds can be paid to junior lienholders in order of priority. (4 Miller & Starr, Cal. Real Estate (2d ed. 1989) § 9:165, p. 558.) The issue of the priority of the competing deeds of trust was properly before the court in the motion for summary adjudication.

II
(3) The Trust contends the modifications to the Bank of America note and deed of trust in 1993 were not so substantial as to cause any change in the priorities of the liens. The Trust argues that instead of prejudicing Lennar, the modifications benefited the junior lienholders by curing the default. While conceding there were modifications to the term, interest rate, and principal balance of the loan, the Trust disputes the extent and the effect of each modification. The Trust urges the modifications, whether taken individually or in the aggregate, were minor. The Trust argues that since the question of whether the modification was substantial and prejudicial is essentially factual, it cannot be resolved as a question of law.
The Trust does not contend that Lennar or Chase consented to the modification. Indeed, in its motion for summary adjudication, Lennar provided a letter from Chase's counsel to the title company objecting to the increase in debt secured by the first trust deed. Instead, the Trust disputes the materiality of the changes resulting from the modification.
The 1993 amendment to the Bank of America note extended its term to December 15, 1994, and permitted an additional one-year extension upon payment of $10,000. The Trust argues that by extending the loan rather than simply foreclosing, it bestowed a benefit upon the junior lienholders. A senior lienholder may extend the time for payments of the senior debt provided the extension does not impair the junior lienholder's rights and security. (Western F.G. v. Security Title etc. Co. (1937) 20 Cal. App.2d 150, 155-157 [66 P.2d 742].) In Resolution Trust Corp. v. BVS Development, Inc. (9th Cir.1994) 42 F.3d 1206, the subordinated lienholder contended the subordination agreement was nullified by a five-month extension of the senior loan. The Ninth Circuit, applying California law, found this extension *1584 was not the type of modification that materially increased the risk of default. Rather, the extension gave the development a greater chance of turning around and becoming successful, which gave the subordinated lender a greater chance of being paid. (Id. at p. 1215.)
Here, too, the extension was made at a time when the borrower was in difficulty; it could be reasonably argued the extension gave the borrower a chance to turn itself around and pay off its debts. By itself, the extension cannot be said to be a material modification requiring an adjustment of priorities as a matter of law. At most, it raises a factual issue of whether it materially affected the value of Lennar's junior lien.
The more significant modifications were to the interest rate and the principal amount of the note. The interest rate was changed from a variable rate of prime plus 3 percent to a fixed rate of 12 percent. The Trust argues this change is immaterial and was not much of an increase, if at all. It notes the interest rate would be about the same at the time of briefing, since the prime rate was then 9 percent. This argument ignores the effect the rate change had at the time it was made. The Trust's own undisputed evidence indicated that at the time of the modification the prime rate was 6 percent. Thus, the modification increased the interest rate from 9 to 12 percent. This increase was substantial, particularly when coupled with the increase in the principal amount of the note.
The trial court found the principal of the note was increased by over $140,000; this figure is taken from the amendment to the note which states $934,513.16 is the amount then due and additional advances have increased the principal, with interest through May 15, 1994, to $1,075,000. The Trust disputes this finding. It contends the only additional advance was $14,849.35, which was disbursed to TVIM for repairs and maintenance, and did not prejudice the junior lienholders.[3] The Trust contends the remaining difference between the stated amount due on the note ($934,513.16) and the amount of the amended note ($1,075,000) was the required payoff to Bank of America ($980,654.27), prepaid interest ($75,000), and closing costs.
Lennar contends that regardless of what the additional amounts represent, they still increased the amount of secured debt senior to its lien. The *1585 enlarged debt payment increased the expenses of the property, thus lessening the return available to junior lienholders. Lennar points out that since prepaid interest of 12 percent on $1,000,000 for five months would be only $50,000, the additional $75,000 represents either prejudicial usurious interest or an additional advance. Further, by adding the accrued interest and prepaid interest to the principal, the note changed from simple interest to compound interest.
Lennar has the better argument on this point. An extension of a senior debt that merely alters the date of payments generally does not adversely affect the junior lienholders. However, when the obligation is increased, by an increase in the principal amount or an increase in the interest rate, the junior lienholder's position is worsened. (3 Powell, Real Property (1996) ¶ 458, pp. 37-258 to 37-259.) The effect of the modifications taken together was to increase substantially the amount of secured debt that was senior to Lennar's lien. As Miller and Starr explain, a modification to the senior secured debt, such as an increase in the interest rate, can affect the income produced by the property. As the expenses increase, the value of the property, as measured by its return, decreases. The decrease in value has a material effect on the value of any existing junior lien. (3 Miller & Starr, Cal. Real Estate, supra, § 8:83, p. 426.) Indisputably, this change adversely affected Lennar's rights as a junior lienholder and the value of its security. While a dispute over the effect of an unconsented to modification often raises a question of fact, where reasonable minds cannot differ, the question may be resolved as one of law. (Katz v. Chevron Corp. (1994) 22 Cal. App.4th 1352, 1368, fn. 12 [27 Cal. Rptr.2d 681] ["... where reasonable minds could not differ on the question, `materiality' could be determined as a matter of law."].) Here, there can be no reasonable dispute as to the effect of the modifications. The trial court did not err in finding the modifications were substantial as a matter of law. We must now determine the effect of the substantial modification on the priorities of the liens; that is, whether the modifications require the Trust's entire lien to lose its priority, or only the modifications.

III
(4a) In finding the modifications resulted in a loss of priority of the Trust's entire lien, the court relied upon Gluskin v. Atlantic Savings & Loan Assn. (1973) 32 Cal. App.3d 307 [108 Cal. Rptr. 318]. In Gluskin, the plaintiff sold land to the buyer for $400,000 and took back a note for $175,000 secured by a deed of trust on the property. The buyer secured two construction loans to build houses on the property. The plaintiff agreed to subordinate its deed of trust to those of the construction lender. The two notes to the *1586 construction lender were payable in 30 years. (Id. at pp. 311-312.) Due to a poor market for housing sales, the buyer and the construction lender restructured the loan. The principal of the larger note was reduced from $2,246,580 to $712,530; the interest increased from 6 1/4 to 10 percent; the monthly payments reduced; and the maturity shortened to 10 months with a large balloon payment at the end. The modification also contained the buyer's representation that no one else had an interest in the land. The buyer ultimately defaulted and the construction lender bought the property at a foreclosure sale. (Id. at p. 312.)
The plaintiff seller objected the modifications were made in utter disregard of its rights as the junior lienholder. It sought declaratory relief that its lien was superior to the deeds of trust held by the construction lender. The trial court entered judgment adverse to the seller. The appellate court reversed. Recognizing the vulnerable position of the subordinating seller, it held that public policy required protection of subordinating sellers. "[A] lender and a borrower may not bilaterally make a material modification in the loan to which the seller has subordinated, without the knowledge and consent of the seller to that modification, if the modification materially affects the seller's rights." (Gluskin v. Atlantic Savings & Loan Assn., supra, 32 Cal. App.3d at p. 314.) The court noted that if sound business required the modification, the seller would presumably agree. "If a dispute results from an unconsented to modification it is of course a question of fact whether the modification materially affected the rights of the subordinated seller." (Id. at p. 315.)
While there was no general obligation on a lender to protect a subordinating seller from the risk of the buyer's default, the requirement of fair dealing prohibits conduct between a lender and a buyer that results in destruction of the seller's interest. (Gluskin v. Atlantic Savings & Loan Assn., supra, 32 Cal. App.3d at p. 315.) "If, however innocently, their bilateral agreement or conduct so modifies the terms of the senior loan that the risk that it will become a subject of default is materially increased, then the buyer and the lender may subject themselves to liability to the seller if they proceed without the latter's consent, and if the seller's otherwise junior loan is to be adversely affected." (Ibid.) The court found the seller had not consented to the modification and its drastic terms "clearly enhanced the likelihood of a default by [buyer] and the consequent foreclosure." (Id. at p. 317.)
While the Gluskin court did not specify the liability the buyer and the lender face in making a modification without consent of the subordinating seller, the case has been interpreted to permit the loss of the lender's lien *1587 priority. (2 Cal. Real Property Financing (Cont.Ed.Bar 1989) § 1.21, p. 23.) That is how the trial court applied Gluskin in this case.
While the court in Gluskin v. Atlantic Savings & Loan Assn., supra, 32 Cal. App.3d 307 addressed the particular situation of a subordinating seller, a leading commentator has suggested that a material modification to any senior lien should result in a loss of priority. "It is submitted that in any case where the senior lien is modified in any material manner which produces an important impact on the value of the junior lien, the modification should be junior to the second lien, and if that is not practical, the entire senior lien should become junior to the existing second lien." (3 Miller & Starr, Cal. Real Estate, supra, § 8:83, p. 426.) Another authority has stated that "[s]ince the junior lienholder had no notice of the additional indebtedness when the junior lien arose, only the amount of the original obligation should enjoy the priority position held by the senior mortgage." (3 Powell, Real Property, supra, ¶ 458, p. 37-259.)
The Trust contends that if the modifications were substantial, the proper remedy requires that only the modifications lose priority, arguing a total loss of priority is appropriate only in the case of a subordinating seller, as in Gluskin v. Atlantic Savings & Loan Assn., supra, 32 Cal. App.3d 307. The Trust asserts that the public policy need for protection of a subordinating seller does not apply between two hard money lenders, as here. It cites several cases in which only the modification was denied priority. For example, in Miller v. Citizens Sav. & Loan Assn. (1967) 248 Cal. App.2d 655 [56 Cal. Rptr. 844], the seller subordinated its deed of trust to those of the construction lender. The lender then advanced sums that were not used for construction purposes. The court held these amounts were subject to the deed of trust of the seller. (Id. at p. 665.)
A similar rule applies to a modification of a lease that is senior to other encumbrances. A "lessor, by the extension agreement with the lessee, could not, without notice, knowledge or consent of the plaintiff, create a greater burden on the property, or carve any estate therefrom, other than that reserved to it under the original lease, without making such extension agreement and its additional burdens subject to the superior rights of the plaintiff under the trust deed." (First Nat. Bank v. Coast Consol. Oil Co. (1948) 84 Cal. App.2d 250, 255-256 [190 P.2d 214].)
In R-Ranch Markets #2, Inc. v. Old Stone Bank (1993) 16 Cal. App.4th 1323 [21 Cal. Rptr.2d 21], the lessor entered into a lease amendment with the lessee that permitted assignment or subletting without the consent of the landlord. The original lease had prohibited assignment or subletting. When *1588 the secured lender, whose deed of trust was junior to this lease, foreclosed on the property, the amendment to the lease was extinguished. The court found the amendment was made without the lender's consent and it "substantially increased the burden on the property and security without [the lender's] consent." (Id. at p. 1328.)
Lennar urges the Trust has provided no authority for treating hard money lenders differently than subordinating sellers. Further, it contends the modification cannot be easily segregated from the remainder of the loan. It argues the Trust's suggestion that only the change in principal lose priority ignores the changes in the interest rate and the maturity date of the note.
We need not determine whether a material modification to a senior lien may result in a total loss of priority of the senior lien where the lienholders are hard money lenders. The equities in this case do not require such a result. Here, the impairment to Lennar's security and its rights as a junior lienholder caused by the modification can be fully eliminated by denying priority to the modification. Unlike in Gluskin v. Atlantic Savings & Loan Assn., supra, 32 Cal. App.3d 307, the modification had no effect on the value of the underlying security. Denying priority only to the modification restores Lennar to the same position as before: the position it bargained for by agreeing to accept a second lien on the property as security for its loan. At foreclosure the amount due under the Bank of America note, calculated in accordance with the terms of the note before the 1993 amendment, can be calculated and given first priority. Any additional amount owing under the amendment would then be junior to the liens existing as of the date of the modification.
When the junior lienholder is a subordinating seller, equity may require a different result. As the Gluskin court noted, a subordinating seller is in a particularly vulnerable position. By subordinating the purchase money deed of trust to that of the construction lender, the seller must rely that proceeds from the construction loan will properly be used to enhance the value of the property, for only then can the seller be assured the property will be adequate security for both the purchase loan and the construction loan. (Gluskin v. Atlantic Savings & Loan Assn., supra, 32 Cal. App.3d 307, 313-314; see also Handy v. Gordon (1967) 65 Cal.2d 578, 581 [55 Cal. Rptr. 769, 422 P.2d 329, 26 A.L.R.3d 848].) In Gluskin, the modifications were "substantial and drastic"; the principal was reduced, the interest rate increased, and the maturity shortened from 30 years to 10 months. (32 Cal. App.3d at p. 312.) The effect of these modifications, as the seller alleged, was to allow the construction lender "to escape its obligation to *1589 disburse construction funds and to obtain property for itself without having to pay [the seller] the balance owing on the sales price." (Ibid.) The very short term with a large balloon payment clearly enhanced the likelihood of default. (Id. at p. 317.) Moreover, since the default occurred before construction had enhanced the value of the property, the seller was left with worthless security. In the vernacular of the marketplace, the seller was "`wiped out.'" (Middlebrook-Anderson Co. v. Southwest Sav. & Loan Assn. (1971) 18 Cal. App.3d 1023, 1037 [96 Cal. Rptr. 338].) In this circumstance, subordinating the entire lien of the construction lender to those of the existing juniors is fair and reasonable.
(5) The rationale for deciding when to subordinate only the modification and when the entire lien loses priority is explained by a New York court. "It is well established that while a senior mortgagee can enter into an agreement with the mortgagor modifying the terms of the underlying note or mortgage without first having to notify any junior lienors or to obtain their consent, if the modification is such that it prejudices the rights of the junior lienors or impairs the security, their consent is required [citations]. Failure to obtain the consent in these cases results in the modification being ineffective as to the junior lienors [citation] and the senior lienor relinquishing to the junior lienors its priority with respect to the modified terms [citations]. While this sanction ordinarily creates only the partial loss of priority noted above, in situations where the senior lienor's actions in modifying the note or mortgage have substantially impaired the junior lienors' security interest or effectively destroyed their equity, courts have indicated an inclination to wholly divest the senior lien of its priority and to elevate the junior liens to a position of superiority [citation]." (Shultis v. Woodstock Land Dev. Assoc. (1993) 188 A.D.2d 234, 236-237 [594 N.Y.S.2d 890, 892].)
(4b) We need not address the Trust's contention that equitable subordination should apply. "The whole theory of equitable subrogation in such situations is that the junior encumbrancer ... is left in exactly the same junior position he had before. [Citations.]" (Smith v. State Savings & Loan Assn. (1985) 175 Cal. App.3d 1092, 1097 [223 Cal. Rptr. 298].) That is accomplished by making only the 1993 modification to the Bank of America note a junior lien.

DISPOSITION
The judgment is reversed and the matter remanded to the trial court with directions to enter judgment in favor of the Trust on its cross-complaint and to make a declaration of the priority of the liens, treating the modification to *1590 the Trust's lien separately, in accordance with the views expressed in this opinion. Since the Trust and TVIM have substantially prevailed on appeal, they shall recover their costs. (Cal. Rules of Court, rule 26.)
Sparks, Acting P.J., and Nicholson, J., concurred.
NOTES
[1]  The complaint named several Doe defendants. The complaint was later amended to show the true names of four of these defendants; they were junior lienholders on the property. Default judgments were entered against three of these defendants. The fourth had to be served by publication, and disposition of the matter as to him does not appear in the record.
[2]  The trial judge who ruled on the receiver's petition disqualified himself from the case.
[3]  Where a deed of trust secures optional future advances, priority of the security for such future advances is determined by the circumstances when the advances are made; if at that time the senior lender has notice of other liens, the other liens have priority. (Pike v. Tuttle (1971) 18 Cal. App.3d 746, 751 [96 Cal. Rptr. 403].) Neither party proposes that this case should be treated as a future advance case. Thus, we need not determine whether the original deed of trust authorized future advances or whether the Trust had actual notice of the junior liens at the time it made the advances.
