#### DAIWA BANK, LIMITED, Plaintiff-Appellant, v. LA SALLE NATIONAL TRUST, N.A., et al., Defendants-Appellees.

Second District

Nos. 2—91—0455, 2—91—0926 cons.

Opinion filed May 13, 1992.

Rehearing denied June 24, 1992.

*368Stephen C. Ascher, Albert E. Fowerbaugh, Jr., and Hugh C. Griffin, all of Lord, Bissell & Brook, of Chicago (Edward C. Fitzpatrick and Diane I. Jennings, of counsel), for appellant.

McDermott, Will & Emery (John T. Schriver, of counsel), Michael A. Pope, of Pope & John, Ltd. (Steven J. Roeder, of counsel), and Howard M. Turner, of Gould & Ratner, all of Chicago, Ariano, Anderson, Eazos, Hardy, Kramer & Castillo, P.C., of Elgin (Allen M. Anderson, of counsel), William F. Bochte, of Bochte & Kuzniar, of St. Charles, James D. Skaar, of Smith, Landmeier & Skaar, P.C., of Geneva, and Jeremy C. Wicker, of O’Quinn, Kerensky & McAninch, of Houston, Texas, for appellees.

JUSTICE BOWMAN

delivered the opinion of the court:

Plaintiff, Daiwa Bank, Limited (Daiwa), initially brought this matter as an interlocutory appeal pursuant to Supreme Court Rule 307(a)(1) (134 Ill. 2d R. 307(a)(1)). Daiwa appealed from an order of the circuit court of Kane County directing it to release a mortgage it held on property owned by the defendants, La Salle National trust No. 11586 and Lakes of Dundee Development Venture (collectively, Venture), upon payment of amounts owed to plaintiff by defendants. Subsequently, Daiwa filed an additional appeal from final orders which dismissed its complaint in its entirety. The two appeals have been consolidated and will be considered accordingly.

Daiwa initiated this action to recover funds advanced to defendants on a construction loan which was secured by a mortgage. At the time the suit was filed the mortgaged property was held in a *369land trust by La Salle as trustee for the beneficial owner, the Venture, which was a joint venture between Coventry Development Associates Chicago, Ltd. (Coventry), and Lakes of Dundee Development Corporation. Defendant Monzer Hourani is the president of Lakes of Dundee Development Corporation.

On July 3, 1990, the parties entered into a construction loan agreement whereby Daiwa promised to lend up to $9,950,000 to the Venture to finance the development of an apartment complex on property located in Kane County. The Venture executed a construction loan note in favor of Daiwa which was secured by a mortgage on the Kane County real estate. Defendants Monzer Hourani, Parsifal Corporation, Hourani Family Trust, and Hourani International Corp. (collectively, Hourani defendants) signed a guaranty making them liable for repayment of the loan in the event the borrower failed to fulfill its contractual obligations. The Hourani and Venture defendants also signed an agreement indemnifying Daiwa against certain losses and liabilities. Both the construction loan agreement and the guaranty contained express warranties and representations that, as of July 3, 1990, there were no actions pending against the Venture or any guarantor which might materially adversely affect its financial condition or its ability to perform its obligations to Daiwa. The documents additionally warranted that no material facts had been omitted from the guarantors’ financial statements. By July 30,1990, Daiwa had disbursed $670,631 of the loan proceeds.

On August 9, 1990, Daiwa filed a six-count complaint against all of the defendants, alleging that they had made material misrepresentations in the loan agreement and guaranty, thereby defaulting on the loan. Daiwa specifically alleged that, on August 2, 1990, it discovered for the first time that defendant Monzer Hourani was a defendant in a lawsuit for $7.5 million brought in connection with a Texas savings and loan under conservatorship. That suit, filed on May 7, 1990, alleged that Hourani was the guarantor of a defaulted loan made by the failed savings institution.

In its second amended complaint, filed in March 1991, Daiwa further alleged that several other similar lawsuits had also been pending against Hourani when he executed the guaranty in this case. Also, according to the complaint, Hourani had submitted financial statements to Daiwa which reflected a substantial personal net worth while at the same time submitting documents in unrelated transactions showing a negative net worth. Daiwa claimed that the defendants’ misrepresentations and failure to disclose the lawsuits pending against Hourani constituted a default under the *370loan agreement and mortgage. The complaint sought foreclosure of the mortgage, compensatory and punitive damages for breach of contract and fraud, contractual indemnity, and a declaratory judgment that Daiwa had properly declared the loan in default.

After Daiwa filed its suit, a dispute developed between the Coventry partner of the Venture and defendant Hourani. In September 1990, Hourani filed suit in Texas against Daiwa as well as Coventry. The Texas claims against Daiwa were based on lender liability and sounded in breach of contract, breach of fiduciary duty and fraudulent misrepresentation.

The Coventry and Hourani interests entered into a settlement agreement two days before trial was to begin in Texas. Under the agreement the Hourani defendants assigned their interest in the Venture to an affiliate of Coventry, which then took the place of Lakes of Dundee Development Corporation as a partner in the Venture. Transfer of the Hourani interest was contingent upon the Venture tendering to Daiwa by April 1, 1991, the amount necessary to pay the debt owed to Daiwa. If the Venture did not make the tender by the specified deadline, Hourani could tender payment, and, if it was accepted, Hourani could reclaim, and Coventry would forfeit, all right and title to the assets of the Venture. Hourani retained the rights to the lender liability suit brought against Daiwa in Texas.

Shortly after Coventry and Hourani reached their settlement agreement, in response to a request from La Salle, Daiwa issued a payoff letter showing the amount of principal and interest currently due on the construction loan, as well as an amount of $271,291.54 for “Estimated Attorneys’ Fees through January 11, 1991.” Daiwa also indicated it would not release the mortgage unless the Venture either released the claims it asserted against Daiwa in both the Texas and Illinois litigation or provided alternate security to indemnify Daiwa from damages and expenses incurred or to be incurred as a result of those claims. The Venture tendered the amounts stated in Daiwa’s payoff letter except for the amount of attorney fees, for which they tendered $25,000. The tender was rejected by Daiwa on the ground that it failed to comply with the terms of the loan instruments.

The Venture then moved to compel Daiwa to release its mortgage lien on the Kane County property. The motion asked the court to (1) hold an evidentiary hearing on the reasonableness of Daiwa’s requested attorney fees, (2) find that the tender made by the Venture satisfied its obligations under the loan documents, and (3) order Daiwa to release its lien on the defendants’ property. Following *371submission of memoranda and argument of counsel, the court held the motion would be allowed upon proof of sufficiency of the tender.

At the evidentiary hearing Daiwa presented evidence of the following attorney fees and expenses incurred through January 16, 1991:

> “(1) $60,198.40 in fees and $2,658.30 in expenses paid or owed to the law firm of Goldberg, Kohn, Bell, Rosenbloom & Moritz, Ltd. in connection with the performance and funding of the loan and this suit to enforce Daiwa’s remedies under the loan instruments.

> (2) $3,749 in fees and $147.50 in expenses paid or owed to the law firm of Meyers, Schuster & Meyers in connection with this action to enforce remedies under the loan instruments;

> (3) $94,989.70 in fees and $8,158.22 in expenses paid or owed to the law firm of Lord, Bissell & Brook in connection with this action to enforce remedies under the loan instruments; and

> (4) $89,951.25 in fees and $16,986.09 in expenses paid or owed to the law firm of Vinson and Elkins for their representation of Daiwa in the Texas action.”

An attorney from each of the named law firms testified generally that the fees and expenses attributable to his particular firm were actually incurred and that the rates charged were typical of those customarily charged to other, similar clients. Two experts, one from Texas and one from Illinois, also testified that the fees charged were reasonable and customary in light of the type, difficulty, and highly adversarial nature of the case; the ability, experience and reputation of counsel; the time constraints resulting from the early trial date set in the Texas litigation; and defendants’ litigation strategy.

The Venture presented one expert witness, Kane County attorney Paul Lewis, who specialized in the area of mortgage foreclosures. Lewis testified as to his opinion of reasonable fees for a simple, essentially uncontested foreclosure proceeding. His testimony indicated that he had made a careful effort to sift out and isolate the fees incurred, not in prosecution of the complaint in its entirety, but only those resulting from pursuit of the count in the complaint which sought foreclosure of the mortgage. He had limited his review to the period of time between the filing of the complaint and the tender of payment by defendants and had not found anything to *372indicate that the foreclosure was contested. Lewis did not think much time had been expended on the foreclosure count after the complaint was filed, although he was aware that affirmative defenses had been raised in the verified answers to the complaint.

In regard to the reasonableness of the fees charged, Lewis had broken down the summaries of attorney fees which had been provided to him into three categories: those directly connected with the Kane County foreclosure action on their face; those connected with matters other than the Kane County cause on their face; those which appeared to be a mixture of the other two. Adding together the fees submitted for matters connected in whole or in part with the foreclosure litigation, and utilizing the amounts actually charged by the various firms, rather than what he opined was usual for foreclosure proceedings in Kane County, Lewis arrived at a total figure of less than $50,000 as a reasonable fee for the collective services rendered in connection with the foreclosure count of Daiwa’s complaint. He allocated the following specific amounts to each firm:

> Goldberg, Kohn, Bell, Rosenbloom & Moritz, Ltd.

> directly related: $13,680.00

> mixed: $19,555.00

> Lord, Bissell & Brook

> directly related: $ 8,894.10

> mixed: $ 3,687.50

> Meyers, Schuster & Meyers

> directly related: $ 1,736.50

> mixed: 230.00

Lewis indicated that he believed reasonable total expenses for the foreclosure action would be around $500.

Finally, Lewis’ testimony revealed that he believed it was necessary for the loan documents to include a provision for attorney fees in order to secure an award of such fees. However, he also made it clear that he believed the amount of attorney fees which could be recovered for purposes of a foreclosure action was limited by the foreclosure statute. He acknowledged that other attorney fees may be sought pursuant to the contract between the parties, but noted that, under Illinois law, such fees do not become part of the lien on the property.

On March 29, 1991, the trial court issued an order directing Daiwa to release its mortgage upon payment of principal, interest, *373prepayment fees, and $41,560.37 in attorney fees, distributed as follows:

> Goldberg, Kohn, Bell, Rosenbloom & Moritz, Ltd.:

> $24,786.60, which included $1,329.15 in expenses;

> Lord, Bissell & Brook:

> $14,774.87, which included $4,079.11 in expenses; and

> Meyers, Schuster & Meyers:

> $1,998.90, which included $147.50 in expenses.

The court further ruled that the defendants were not required to provide any indemnification to plaintiff as part of the equitable redemption. Finally, the court did not allow any of the fees or expenses incurred as a result of the Texas litigation.

On April 1, the Venture tendered to Daiwa a check for $783,720.29 pursuant to the court’s order. Daiwa accepted the check but, as of April 12, had not given defendants a release deed. The Venture petitioned for a rule to show cause why Daiwa should not be held in contempt for failure to comply with the order of March 29 which called for release of the lien upon tender of payment. Daiwa moved, without success, for reconsideration or clarification of the order.

On April 17, Daiwa both asked the circuit court to stay enforcement of the March 29 order and filed a notice of interlocutory appeal from that order. The trial court denied the motion to stay enforcement, and Daiwa’s subsequent request to this court for a stay was also denied. Accordingly, the day before the hearing on the rule to show cause, Daiwa delivered to defendants a release deed, releasing its mortgage lien on the defendant’s Kane County property.

On April 5, 1991, a few days after the Venture had tendered payment to Daiwa, both the Venture and the Hourani defendants moved to dismiss the respective counts of Daiwa’s complaint which sought recovery from them. In essence, these motions urged that through the redemption tender Daiwa had been paid all it was owed and, therefore, its claims should be dismissed. The declaratory judgment count was assertedly mooted by payment to Daiwa and otherwise attacked as seeking inappropriate relief.

Daiwa responded to the motion with affidavits detailing all of its claimed but as yet uncompensated fees and expenses. These included fees incurred prior to the Venture’s redemption tender but not awarded by the trial court, fees incurred after the redemption tender, and fees incurred in the Texas litigation. On July 30, the *374trial court dismissed all counts of Daiwa’s complaint pursuant to sections 2 — 615 and 2 — 619 of the Code of Civil Procedure (Ill. Rev. Stat. 1989, ch. 110, pars. 2 — 615, 2 — 619). A further order, on August 6, declared that all liens and security interests that Daiwa had in the defendants’ property were extinguished and released, and Daiwa was ordered to deliver releases or cancelled recordable documents. When its motion to reconsider the dismissal was denied, Daiwa timely filed a second appeal. Shortly thereafter, we ordered the consolidation of the later appeal with Daiwa’s pending interlocutory appeal.

We first address Daiwa’s challenge to the March 29 order. Daiwa posits that the order, which directed it to release its mortgage on defendant’s property, was improper because the tender made by defendants was not sufficient to cover the amount due and, therefore, not sufficient to redeem the property. The Venture responds that a fee award is a matter of the court’s discretion and, since the award here reflects no abuse of discretion, it should be affirmed. After thoroughly reviewing the record, we are persuaded that Daiwa must prevail on this point.

Defendants’ motion to compel plaintiff to release the mortgage was accompanied by a motion to tender funds to the court. These two motions leave no doubt that defendants sought an equitable redemption, as distinct from a redemption pursuant to the Illinois Mortgage Foreclosure Law (Foreclosure Law) effective July 1, 1987 (Ill. Rev. Stat. 1989, ch. 110, par. 15 — 1101 et seq.). As a general rule a tender must include everything that the creditor then has a right to recover, whether debt, interest, or costs, and a tender of anything less is nugatory and ineffective as a tender. (River Valley Cartage Co. v. Hawkeye-Security Insurance Co. (1959), 17 Ill. 2d 242, 246-47; Kanter & Eisenberg v. Madison Associates (1986), 144 Ill. App. 3d 588, 594; Smith v. Gen Co. Corp. (1973), 11 Ill. App. 3d 106, 109.) The rule applies to tenders for purposes of equitable redemption from a mortgage. (Flanagan v. Wilson (1941), 310 Ill. App. 557.) While defendants do not dispute this rule, they differ greatly with plaintiff as to what constitutes a sufficient tender in this case.

Both parties look to language in the mortgage and note to support their positions. Daiwa focuses on provisions which, in their entirety, deal with liability for costs and fees. Defendants, on the other hand, stress specific language within the provisions cited by plaintiff which indicates that fees and costs should be “reasonable." Daiwa does not dispute that its fees should be reasonable. Rather, it *375posits that, although the scope of liability for fees was set forth in the loan documents, the trial court concerned itself with only one of the many aspects of that liability. As a result, according to plaintiffs argument, the reasonableness of the total amount of fees claimed was improperly measured against only one small segment of defendants’ contractual liability. Put another way, plaintiff’s argument is that, by determining the reasonableness of the fees without first properly defining defendants’ liability, the trial court effectively limited defendants’ liability to far less than that contemplated by the note and mortgage. We agree.

Contract provisions for awards of attorney fees and costs are an exception to the general rule that, absent a statute which provides otherwise, a successful party is not entitled to recover attorney fees. (Abdul-Karim v. First Federal Savings & Loan Association (1984), 101 Ill. 2d 400, 411-12; Saltiel v. Olsen (1981), 85 Ill. 2d 484, 488; Amoco Realty Co. v. Montalbano (1985), 133 Ill. App. 3d 327, 334-35.) Attorney fees provisions in mortgages fall within the exception. (See Mercado v. Calumet Federal Savings & Loan Association (1990), 196 Ill. App. 3d 483; Skach v. Gee (1985), 137 Ill. App. 3d 216, 221-22.) We conclude that the scope of defendants’ liability for fees must be determined from the agreement between Daiwa and the defendants.

Daiwa cites to section 2.3 of the note signed by the Venture as a contract provision for recovery of the fees it seeks. However, that section allows recovery “in the event of a default in the payment of any amount due” (emphasis added) under the note. Daiwa did not allege a default in payment due, and its invocation of section 2.3 is misleading. Nevertheless, the mortgage securing the note sets forth in section 1.17 various fees also secured, as follows:

> “1.17 Expenses. Mortgagor shall pay when due and payable, and otherwise on demand made by Lender, all *** reasonable attorneys’ fees, court costs, *** and all other reasonable costs and expenses of every character which have been incurred or which may hereafter be incurred by Lender in connection with any of the following:

> (a) The preparation, execution, delivery and performance of the Loan Instruments;

> (b) The funding of the Loan;

> * * *

> (d) Any court or administrative proceeding or other action undertaken by Lender to enforce any remedy or to collect any indebtedness due under this Mortgage or any of the *376other Loan Instruments following a default thereunder, including without limitation a foreclosure of this mortgage ***.

> (e) Any remedy exercised by Lender following an Event of Default including foreclosure of this Mortgage ***.”

An “Event of Default” is defined in the mortgage, in part, as:

> “(d) The material untruth of any warranty or representation made herein or in any affidavit or certificate executed by Mortgagor *** in connection with the Loan, the application therefor or the disbursement thereof.”

We note that in its complaint Daiwa alleged that defendants were in default on the loan. On appeal, plaintiff urges that, by tendering payment of the debt, defendants have admitted they are in default. Defendants concede that, while their attempt to redeem may admit liability for the sum tendered, it does not admit the far greater liability sought by Daiwa. Defendants’ concession misses the point. The question here is not the degree of liability admitted but whether defendants admitted they defaulted under the contract. The parties’ agreement expressly states that Daiwa is entitled to recover certain fees and costs in the event of the borrower’s default. Daiwa alleged that defendants were in default and, on that basis, sought to recover its funds. Defendants determined at some point to tender payment rather than defend against Daiwa’s claim of default. Under these circumstances, for the limited purpose of determining the extent of attorney fees due to plaintiff in this litigation, we determine that defendants’ tender of payment is an admission of default.

While the loan documents clearly allow reasonable expenses incurred in the execution and funding of the loan, as well as those attributable to the collection of the debt or the pursuit of any remedy available to the lender, the record reflects that the trial court confined its award to fees and costs incurred solely in the prosecution of one, closely limited, segment of this litigation. The trial court set out the specific sums it allowed to each of Daiwa’s Illinois counsel, but it did not offer an explanation as to how it calculated those sums. However, it is evident to us, and defendants acknowledge, that the court accepted the testimony of defense witness Paul Lewis as to reasonable fees. For each law firm the court added together the following: the amount stated by Lewis to be directly connected with the foreclosure litigation; one-half of the amounts Lewis characterized as a mixture of foreclosure and other work; and one-half the costs charged by each firm, except the Schuster firm for which full costs were allowed. Thus, it appears the trial *377court found the sums calculated by Lewis to be uniformly reasonable, and those amounts formed the basis for the fee awards.

The problem with the trial court’s approach is that it addressed only the fees incurred in the foreclosure proceedings. According to his testimony, Lewis closely confined his examination of the fee summaries to those items related to the preparation, filing, and prosecution of count I of Daiwa’s complaint, the count for foreclosure. Lewis stated that he had limited his review to the period of time between the filing of the complaint and the tender of payment. He had not found anything to indicate that the foreclosure was contested. The witness also remarked that he “didn’t see any great amount of time spent on the foreclosure count after the filing of the complaint.” Lewis simply did not testify regarding fees attributable to anything other than the foreclosure.

While Lewis provided the trial court with ample information regarding fees in the foreclosure action, the complaint contained seven counts in addition to the foreclosure claim. The court made no allowance for fees relative to any of these other counts despite language in the mortgage indicating that it secured payment of costs and fees incurred in collecting any debt owed under the parties’ agreement. Collection could be pursued through legal proceedings, including but not limited to foreclosure. Nor did the court allow any amount for expenses associated with the loan itself even though the mortgage plainly states that the borrower shall pay fees and costs incurred in the “preparation, execution, delivery and performance of the Loan Instruments” and in the “funding of the loan.” In our view the contract requires defendants to pay reasonable fees and costs connected not just with the foreclosure proceedings but also with all aspects of the Illinois litigation initiated by plaintiff to recover its funds. Too, Daiwa is entitled to reasonable fees and costs associated with processing the loan.

The authorities invoked by defendants stand for the proposition that attorney fees awards are within the discretion of the trial court. However, plaintiff points out, and we agree, that defendants’ cases are either inapposite or involve factual situations where questions of liability had already been determined, and the only question remaining was the amount of the award to be granted. In this case, the full scope of attorney fees and costs secured by the mortgage had not been properly delineated by the trial court, and determination of the amount of the award was, therefore, premature.

Defendants rely also on section 15 — 1510 of the Foreclosure Law (Ill. Rev. Stat. 1989, ch. 110, par. 15 — 1510) to support their *378position that Daiwa’s Illinois attorney fees award was adequate. Defendants’ recourse to the statute is questionable initially since, according to the record, they expressly waived their statutory right to redeem the mortgage and now seek an equitable, rather than statutory, redemption. Thus, equitable principles control what is due to plaintiff. (Flanagan v. Wilson (1941), 310 Ill. App. 557.) However, even taking the statute into consideration does not aid defendants. The statute expressly provides for recovery of fees incurred “in connection with the preparation, filing or prosecution of [a] foreclosure suit” to the extent that such fees have been set forth in a written agreement between the parties. However, as we read it, this provision in no way limits the items or amounts that a borrower may agree, as a matter of contract, to secure with a mortgage. It does not say that the parties to a mortgage may not provide for recovery of other fees and costs, fees not necessarily directly related to the foreclosure, if they choose to do so. In our opinion, the statute does not preclude Daiwa’s recovery of all those attorney fees and costs which defendants agreed to secure with the mortgage.

Defendants repeatedly draw a distinction between fees incurred in connection with Daiwa’s foreclosure and fees which, although charged to Daiwa in the course of this litigation, are characterized by defendants as fees incurred in defending the suit brought by Hourani in Texas. They claim that the trial court properly refused to allow those fees. However, the record of this case reflects only an attempt by Daiwa to enjoin the Texas action on the ground that it involved the same issues as the Illinois action and that complete relief could be obtained in Illinois. Daiwa asserted that injunctive relief was needed to protect the Illinois court’s jurisdiction over the controversy and to prevent duplicative and burdensome litigation as well as possible inconsistent findings and judgments.

Although it is plainly evident that the two actions include' a number of the same issues, we do not perceive Daiwa’s allegations in Illinois regarding injunctive relief as an attempt to defend against the merits of the Texas case. On the contrary, it appears Daiwa sought an injunction to secure the integrity of the Illinois proceedings as well as to avoid additional litigation. While we ultimately held that the trial court erred in enjoining Hourani’s suit against Daiwa in Texas (Daiwa Bank, Ltd. v. Monzer Hourani (1991), 207 Ill. App. 3d 1112 (unpublished order under Supreme Court Rule 23), appeal allowed (1991), 141 Ill. 2d 537), we think the *379particular fees attacked here by defendants are attributable to Daiwa’s action to collect a debt rather than an attempt by Daiwa to defend against the suit filed by Hourani. Consequently, those fees may be recovered pursuant to the parties’ agreement.

Daiwa next asserts that the lower court erroneously disallowed its claim for more than $100,000 in costs and attorney fees which, unlike those just discussed, were incurred in direct connection with defense of the suit brought by Hourani in Texas. That action was brought in the name of the Venture and alleged that the mortgage was not in default and Daiwa therefore breached the contract both by refusing to further fund the loan and by initiating foreclosure proceedings. In support of its argument that it is entitled to fees, Daiwa refers to language in the mortgage which requires defendants to reimburse it for fees incurred in, as paraphrased in Daiwa’s brief:

> “1) any proceeding involving the loan instruments;

> 2) any suit asserted against Daiwa on account of any act performed or omitted to be performed; and

> 3) any action in any way connected with the mortgage, the loan instruments, or the indebtedness evidenced by the note or any of Borrower’s Liabilities.”

While the trial court did not offer an explanation of its denial of the Texas fees, its decision appears to have been consistent with its focus on only the foreclosure aspect of the complaint, as described above. Whatever the basis for the trial court’s decision, however, whether Daiwa is entitled to the Texas fees, like the question of its entitlement to Illinois fees, must be determined first and foremost from the agreement of the parties. The cardinal rule in construing a contract is to give effect to the parties’ intent, and to discern this intent the various contract provisions must be considered as a whole. (Robert S. Pinzur, Ltd. v. The Hartford (1987), 158 Ill. App. 3d 871, 876.) Since words derive meaning from the context in which they occur, each part of a contract must be viewed in light of the other parts. (Board of Trade v. Dow Jones & Co. (1983), 98 Ill. 2d 109, 122-23.) Similarly, we think that individual provisions of a contract are properly understood only by examining the entire provision rather than selected phrases.

Daiwa’s citations to the mortgage are not exactly precise, but it appears the first cite is to section 1.17(c), which states:

> “1.17 Expenses. Mortgagor shall pay *** reasonable attorneys’ fees, [and costs] *** incurred by Lender in connection with ***:

> *380* * *

> (c) Any court or administrative proceeding involving Mortgagor, the Mortgaged Property or the Loan Instruments to which Lender is made a party or is subject to subpoena by reason of its being a holder of any of the Loan Instruments, including without limitation bankruptcy, insolvency, reorganization, probate, eminent domain, condemnation, building code and zoning proceedings.”

Read in its entirety the language of this section indicates it was meant to apply to situations where the bank would be only peripherally involved. Proceedings such as bankruptcy, probate, and eminent domain would not involve actions against the bank for any wrongdoing alleged against it. Rather, they would involve questions raised by third parties about the real estate itself, either as to its use or its status as an asset. The bank would be drawn into such proceedings only because of the interest it held in the property by virtue of the note and mortgage. Section 1.17(c) reflects no intent that defendants should indemnify Daiwa relative to actions, such as the one in Texas, directly against the bank for breach of contract and fraud.

Plaintiff’s second and third citations are to the last sentence of the concluding paragraph of section 1.17, which states:

> “To the extent permitted by law, Mortgagor agrees to hold harmless Lender against and from, and reimburse it for, all claims, demands, liabilities, losses, damages, judgments, penalties, costs and expenses, including without limitation reasonable attorneys’ fees, which may be imposed upon, asserted against, or incurred or paid by it by reason of or in connection with any bodily injury or death or property damage occurring in or upon or in the vicinity of the Mortgaged Property through any cause whatsoever, or asserted against it on account of any act performed or omitted to be performed hereunder, or on account of any transaction arising out of or in any way connected with the Mortgaged Property, this Mortgage, the other Loan Instruments, any of the indebtedness evidenced by the Note or any of the Borrower’s Liabilities.”

Again, when the language isolated by Daiwa is put in context, it is not persuasive that the parties meant to protect Daiwa in the fashion now urged by Daiwa.

It is obvious that the indemnity provided in the first part of the relevant sentence was meant to insulate Daiwa from liability result*381ing from any personal injuries or property damage suffered at the site of the mortgaged real estate or during construction of the proposed apartment complex. Thus, it is highly likely the costs and fees contemplated would be the result of claims made by third parties against both the borrower and the lender rather than actions by the borrower against the lender. In our opinion, this focus on suits brought by other parties carries through to the end of the sentence. The provision as a whole evidences a recognition that third parties may sue the bank on the basis of the bank’s conduct relative to the mortgage, even though the bank may be involved only through the mortgagor.

Similarly, the provision recognizes that the real estate itself, as well as the borrowers, could be involved in any number of transactions during the time the bank holds the mortgage and that any such transaction could result in the bank being named in a suit precisely, and only, because it holds the mortgage. This is the kind of liability we believe the parties intended to place on the defendants, not liability for the costs of a suit by the borrowers against the bank for breach of their contract. In sum, we are of the opinion that the trial court did not err in denying the fees and costs incurred by Daiwa in the Texas litigation.

Daiwa’s final contention is that the trial court erred by compelling it to release the lien of its mortgage without requiring the Venture to provide alternative security for satisfaction of any indebtedness yet to be incurred as a result of ongoing litigation between the parties. Daiwa asserts that payment of such debt was secured by the mortgage and that, absent substitute security, the compelled release deprived it of a contractual right and unfairly relieved defendants of a contractual obligation. Plaintiff’s position is sound.

To begin with, we agree with Daiwa that the mortgage provided security for the kind of debt at issue. The mortgage indicates that it secures “the payment of the indebtedness evidenced by the Note and the payment of all other Borrower’s Liabilities and the performance and observance of all covenants and conditions contained in this Mortgage, the Note, the Loan Agreement, *** and [other documents].” The note signed by the Venture also states that “[t]he payment of Borrower’s Liabilities is secured by *** the Mortgage.” The mortgage further provides that its terms shall have the meaning given to them in the loan agreement. The loan agreement, in turn, defines “Borrower’s Liabilities” as “[a]ll present and future, direct or indirect, absolute or contingent indebtedness or other obligations or liabilities *** of Borrower to Lender.” This definition *382clearly contemplates that the borrowers might, in the future, incur relevant debt other than, or in addition to, the present debt represented by the loan itself. In our opinion, the loan documents, collectively, reflect an intent by the parties that future debt should become a “Borrower’s Liability” and should be secured by the mortgage. This is the kind of debt that has accrued since the release of the mortgage and perhaps continues to accrue as a result of Daiwa’s efforts to collect what it claims is due. It consists of fees and costs incurred by Daiwa but ultimately determined to be the Venture’s liability under the contract.

We think the parties also intended that the mortgage would not be released until all debts, no matter when they were incurred, were paid. The following mortgage provision demonstrates this intent:

> “General Covenants and Representations. Mortgagor covenants and represents that *** (d) Mortgagor will maintain and preserve the lien of this Mortgage as a first and paramount lien on the Mortgaged Property *** until Borrower’s Liabilities have been paid in full.”

As will be shown, Daiwa is entitled to pursue the remaining claims made in its complaint. Hence, besides any further sums defendants may already owe, it is possible that additional fees and costs will become debt owed by defendants. Under the parties’ contract, Daiwa would not have had to release its mortgage until all such debt had been fully determined and fully paid. The Venture’s resort to equitable redemption short-circuited this contractual process.

The Venture defendants insist that, under the mortgage, they are not liable for any debt not yet in existence. They cite language in the mortgage which states that “[u]pon full payment of the Loan and all other accrued, Borrower’s Liabilities, Lender shall issue to Mortgagor an appropriate release deed in recordable form.” (Emphasis added.) The problem with defendants’ position is that, first of all, they are not seeking enforcement of the contract. Even if they were, they would be held to the obligations imposed by the contract. The provision they rely on contemplates payment of the loan in due course, at a time when the amounts due under the contract have been determined and made certain. Once there was no longer a reasonable possibility of further debt accruing, there would be no need to retain any security. Only then would the mortgage be released.

Moreover, the mortgage provision cited by defendants does not address the situation where, as here, the borrowers seek to equita*383bly redeem in the middle of a foreclosure suit. The Venture was required by the contract to provide and retain security for Daiwa’s benefit until all debt was paid. If redemption is allowed now, and no alternate security is provided, defendants will have their land back, free and clear, without doing the things they were supposed to do, pursuant to the contract, to get it back. Daiwa will be denied that portion of the benefit of its bargain. We do not think this should be the outcome of an equitable redemption.

The Venture seeks an equitable remedy in order to avoid the forfeiture of its property. However, one who invokes the aid of a court of equity must do equity. (Federal National Mortgage Association v. Bryant (1978), 62 Ill. App. 3d 25, 27; Horney v. City of Springfield (1957), 12 Ill. 2d 427, 433.) The parties here had a contract which provided that Daiwa would remain secured until all debt was satisfied. What is equitable is to require defendants to hold up their end of the bargain. Equity will require the release of a mortgage for the protection of a debtor who has discharged his debt but is not available for the purpose of avoiding contractual obligations. (See Jones v. Provident Mutual Life Insurance Co. (7th Cir. 1940), 109 F.2d 412, 415 (applying Illinois law).) We conclude that the lower court erred in not requiring the Venture to provide substitute security for the mortgage Daiwa was compelled to release.

In summary, the trial court correctly disallowed Daiwa’s claim for fees incurred in defending the suit brought by Hourani in Texas. The court erred, however, in awarding Daiwa only the fees associated with the foreclosure rather than the full spectrum of attorney fees and costs contemplated by the parties’ agreement. The court also erred in denying Daiwa’s request for alternative security for relevant fees which it might incur in the future. Absent the Venture’s compliance with the terms of the contract, the trial court improperly ordered Daiwa to release the mortgage. Consequently, the mortgage lien must be reinstated, and we must remand this matter for a hearing on the reasonableness of the accrued fees still owed to Daiwa and a determination of proper alternative security for future debt.

Having determined that Daiwa was entitled to additional categories of fees under the contract, we turn now to plaintiff’s appeal from the orders which dismissed all of the counts of its complaint. Both the Venture and the Hourani defendants filed motions to dismiss pursuant to sections 2 — 619(a)(6) and 2 — 619(a)(9) of the Code of Civil Procedure (Code) (Ill. Rev. Stat. 1989, ch. 110, pars. 2— 619(a)(6), (a)(9)). The motions alleged, in essence, that the recovery *384sought in the other counts of the complaint was exactly the same as that sought in the foreclosure count; the payment to Daiwa of principal, interest, costs, and attorney fees fully satisfied the foreclosure claims; therefore, the damages sought in the other counts had been fully cured, and further claims by Daiwa were barred. The motions were accompanied by affidavits showing that the redemption tender had been delivered to Daiwa. Daiwa responded by submitting affidavits detailing fees and expenditures incurred prior to the tender but not as yet compensated, as well as fees which accrued after the tender. Following hearings on the motions, the trial court dismissed all counts of the complaint pursuant to section 2— 619(a)(9) and/or section 2 — 619(a)(6).

Dismissal is not proper under section 2 — 619 unless the motion raises an affirmative matter which completely negates plaintiff’s cause of action. (Miranda v. Jewel Cos. (1989), 192 Ill. App. 3d 586, 588.) If the grounds for a section 2 — 619 motion do not appear on the face of the complaint, the motion may be supported by an affidavit showing that a claim has been satisfied or released or barred by other affirmative matter. (Ill. Rev. Stat. 1989, ch. 110, pars. 2 — 619(a)(6), (a)(9); Dahl v. Federal Land Bank Association (1991), 213 Ill. App. 3d 867, 869.) The nonmovant may contest the allegations of the motion and file supporting affidavits of his own, thereby raising a question of disputed fact. (Ill. Rev. Stat. 1989, ch. 110, par. 2 — 619(c); Colley v. Swift & Co. (1984), 129 Ill. App. 3d 812, 818.) When facts are in contention in a case where one of the parties is entitled to a jury trial, and the other party has made a timely jury demand, the court is bound to deny the section 2 — 619 motion. (Ill. Rev. Stat. 1989, ch. 110, par. 2 — 619(c); Colley, 129 Ill. App. 3d at 818.) Upon application of these principles we find that the trial court erred in dismissing Daiwa’s complaint.

The dismissal was granted pursuant to sections 2 — 619(a)(6) and (a)(9). Section 2 — 619(a)(6) provides for involuntary dismissal when a claim has been “released, satisfied of record, or discharged in bankruptcy,” and section 2 — 619(a)(9) permits dismissal on the ground that the claim is “barred by other affirmative matter avoiding the legal effect of or defeating the claim.” (Ill. Rev. Stat. 1989, ch. 110, pars. 2 — 619(a)(6), (a)(9).) Accordingly, the crux of the dismissal order was that the claims made in the foreclosure count had been fully satisfied and that such satisfaction cured the claims made in all the other counts. However, as we discussed earlier, the lower court erred in determining the scope of defendants’ liability for purposes of equitable redemption, and the matter must be remanded. *385Thus, Daiwa’s foreclosure claims have not been fully satisfied. For this reason alone, the dismissal of the other counts, dependent as it was on the trial court’s disposition of the equitable redemption, cannot stand.

Even if the foreclosure claim had been properly satisfied, however, dismissal of Daiwa’s other counts was not necessarily warranted. First of all, the record does not reflect, and defendants nowhere seriously contend, that Daiwa entered into a satisfaction and accord with defendants or otherwise voluntarily released either the mortgage or any alternative claims. Too, the release of a mortgage amounts only to the release of an interest in or lien on the mortgaged property. In and of itself, such a release does not necessarily mean that other rights the parties may have under the mortgage agreement are extinguished. (Petkus v. St. Charles Savings & Loan Association (1989), 182 Ill. App. 3d 327, 330.) Thus, when Daiwa released the mortgage lien, it relinquished only its interest in defendants’ Kane County property, not its right to pursue either any other debt accruing under the contract or its remaining causes of action. We observe in this regard that, in the fraud counts of its complaint, for example, Daiwa sought punitive damages, a form of damages not requested in the foreclosure count. These kinds of matters were raised by Daiwa in its response to defendants’ section 2 — 619 motion and effectively precluded dismissal.

In support of their motions defendants filed affidavits showing that Daiwa had been paid all that the trial court had determined was due in the equitable redemption proceeding. Daiwa responded that certain fees and expenses were due under the counts other than the foreclosure count but had not been included in defendants’ redemption tender. The supporting affidavits submitted by Daiwa delineated the unpaid fees. The conflicting affidavits raised questions of fact as to the amounts due Daiwa under the fraud, breach of contract and indemnity counts. Thus, the affirmative matter raised by defendants did not completely negate Daiwa’s cause of action. Moreover, Daiwa had made a jury demand in both its initial and second amended complaints. Accordingly, the trial court should have denied the motions to dismiss and allowed the case to proceed to a jury trial.

Defendants assert that Daiwa waived its right to a jury trial because, as allegedly admitted by Daiwa’s counsel, it did not raise the issue until its motion for reconsideration of the dismissal order. We have reviewed in its entirety the report of proceedings of the hearing on Daiwa’s motion for reconsideration. It is evident to us that, *386contrary to defendants’ contention, Daiwa raised the matter of a jury trial in the context of the section 2 — 619 motion.

Specifically, counsel for Daiwa argued that, since the conflicting affidavits raised factual questions, the trial court should submit the matter to a jury. In contrast, both the judge’s questions and opposing counsel’s arguments were directed at the proposition that, had Daiwa wanted a jury trial on the matter of fees in the foreclosure/ equitable redemption proceedings, it should have asked for such a trial at the time. In other words, Daiwa’s counsel focused on his client’s right to a future jury trial of the remaining counts of the complaint, while the court and defense counsel focused on the lack of a specific jury demand regarding the completed equitable redemption. Daiwa was not asserting it should have been given a jury trial previously, but only that, for purposes of the section 2 — 619 motion, it had sufficiently raised factual questions to warrant a jury trial on the remainder of its complaint which, therefore, should not be dismissed.

As to the remaining counts of the complaint, the record plainly shows that Daiwa indicated on its complaint that “TRIAL BY JURY IS DEMANDED.” The demand remained outstanding at the time of the section 2 — 619 motion hearing. The record does not support defendants’ contention that Daiwa waived its right to a jury trial with regard to the counts, other than foreclosure, in its complaint.

Moreover, Daiwa’s complaint encompassed both legal and equitable claims. The count for foreclosure, along with defendants’ preferred equitable redemption, were actions in equity. (State Bank v. Sorenson (1988), 167 Ill. App. 3d 674, 680.) Thus, the focus in the trial court was confined to equitable concerns. In actions of an equitable nature, a trial by jury is generally a matter of discretion rather than right. (Ill. Rev. Stat. 1989, ch. 110, par. 2 — 1111; First State Bank v. Leffelman (1988), 167 Ill. App. 3d 362, 366.) Defendants cite no authority to show that Daiwa was entitled to a jury trial on purely equitable concerns. We can discern no compelling reason why Daiwa should have been required to ask for a jury trial at the time of the equitable redemption hearing in order to preserve its right to a jury trial on the remaining counts.

As a final matter, we consider the dismissal of Daiwa’s count for declaratory judgment. The Venture moved to dismiss, generally pursuant to sections 2 — 619(a)(6) and 2 — 619(a)(9). Specifically, the motion alleged that the redemption tender made to Daiwa had rendered moot Daiwa’s declaratory judgment claim. The Venture *387defendants reasoned that the funds sought by Daiwa had been recovered, so the propriety of the declaration of default was no longer of any consequence. The Hourani defendants moved to dismiss the declaratory judgment claim pursuant to section 2 — 615, asserting that the relief sought was superfluous and duplicative. At the hearing on the motions, the Hourani defendants were granted leave to amend in order to add section 2 — 619 as an alternative basis for their motion. The trial court dismissed pursuant to section 2 — 615 and sections 2 — 619(a)(6) and (a)(9).

A complaint should not be dismissed pursuant to section 2 — 615 unless it clearly appears that no set of facts can be proved which will entitle the plaintiff to recover. (McGrath v. Fahey (1988), 126 Ill. 2d 78, 90.) On appeal, the only argument made in support of the section 2 — 615 dismissal is the Venture’s contention that Daiwa pursued declaratory judgment only to secure a declaration of its own nonliability in Illinois, thus assuring a res judicata defense to Hourani’s lender liability claim in Texas. According to defendants, such relief would not be proper under the declaratory judgment statute since it would deprive Hourani of its choice of whether and how to bring an action against Daiwa.

While defendants’ argument makes it appear that Daiwa first sought a resolution of these liability issues when it added a count for declaratory judgment to its complaint, such an appearance is deceiving. Questions regarding Hourani’s alleged default and all of the defendants’ liability for that default, and, by implication, Daiwa’s nonliability, have been inherent in this case since the day Daiwa filed its initial complaint. Daiwa clearly alleged that the defendants misrepresented Hourani’s financial condition; that it, Daiwa, was entitled to its remedies under the loan documents; and that defendants were liable for all damages. Relief was sought, not only as a matter of declaratory judgment, but under a total of eight counts. We note that Daiwa’s Illinois suit was filed before Hourani filed suit in Texas. Under the circumstances defendants’ argument is not persuasive. That Daiwa may impliedly be found not liable should it be granted declaratory relief does not, in our view, support the conclusion that its complaint for declaratory judgment fails to state a cause of action. The dismissal of the declaratory judgment count on that ground was error.

As for the dismissal under section 2 — 619, similar to the other counts of the complaint the declaratory judgment count was dismissed on the ground that the relief sought had become moot, or irrelevant, or unnecessary due to the satisfaction of Daiwa’s claims *388through the equitable redemption. Since we have determined there has not been full satisfaction, the section 2 — 619 dismissal must be reversed. We hasten to add that, as with the other counts, even if Daiwa’s claims under its mortgage lien had been satisfied, dismissal of the declaratory judgment count would not necessarily have followed.

The parties correctly point out that the decision to grant or deny a request for a declaratory judgment rests within the sound discretion of the trial court, whose determination will not be overturned absent an abuse of that discretion (Stone v. Omnicom Cable Television of Illinois, Inc. (1985), 131 Ill. App. 3d 210, 215). This principle assumes that, before relief is granted or denied, the trial court will actually examine the substance of the declaratory judgment request and, based on that examination, exercise its discretion. The trial court here dismissed because the claim had been “released” or “satisfied of record” (Ill. Rev. Stat. 1989, ch. 110, par. 2 — 619(a)(6)) and/or because the claim was “barred by other affirmative matter avoiding the legal effect of or defeating the claim” (Ill. Rev. Stat. 1989, ch. 110, par. 2 — 619(a)(9)). The lower court found, not that the declaratory judgment claim had no merit or that, in and of itself, it was inappropriate, but merely that it was defeated and barred from moving forward as a result of a separate and distinct judgment.

Although the trial court itself recognized that declaratory judgment relief is a matter of discretion, we can find nothing in the record or in the defendants’ arguments to show that, in this instance, the trial court actually exercised its discretion with regard to Daiwa’s complaint for declaratory relief. Like the other counts, this one must be remanded for further consideration by the trial court.

For all of the reasons set forth above, the order of the circuit court of Kane County, dated March 29, 1991, compelling plaintiff to release its mortgage lien, is reversed, and the lien is hereby reinstated, subject to the rights, if any, of third parties who might have acquired an interest in the mortgaged property subsequent to the release of the lien. The portion of the order of April 12, 1991, denying plaintiff’s motion to reconsider is likewise reversed. The order of July 30, 1991, dismissing all counts of the complaint is reversed in its entirety. The order of August 6, 1991, declaring that any interests plaintiff had in the mortgaged property were extinguished and released and directing plaintiff to deliver recordable releases, is reversed, as is the order of August 12, 1991, denying plaintiff’s *389motion to reconsider. The matter is remanded for further proceedings consistent with this opinion.

Reversed and remanded.

McLaren and NICKELS, JJ., concur.