1 EXHIBIT 10.31 THIRD AMENDMENT TO AMENDED AND RESTATED MASTER REVOLVING CREDIT AGREEMENT AND OTHER LOAN DOCUMENTS THIS THIRD AMENDMENT TO AMENDED AND RESTATED MASTER REVOLVING CREDIT AGREEMENT AND OTHER LOAN DOCUMENTS (this "Amendment") made as of this 18th day of July, 1997, by and among RAMCO-GERSHENSON PROPERTIES, L. P., a Delaware limited partnership ("Borrower"), RAMCO-GERSHENSON PROPERTIES TRUST, a Massachusetts business trust ("Guarantor"), BANKBOSTON, N.A. (formerly known as The First National Bank of Boston), individually ("FNBB"), and NBD BANK ("NBD"; FNBB and NBD are hereinafter referred to collectively as the "Banks"), and BANKBOSTON, N.A., (formerly known as The First National Bank of Boston), as Agent (the "Agent"). W I T N E S E T H: WHEREAS, Borrower, Guarantor, Agent and the Banks entered into that certain Amended and Restated Master Revolving Credit Agreement dated as of June 24, 1996, as amended by that certain First Amendment to Amended and Restated Master Revolving Credit Agreement and Other Loan Documents dated as of May 22, 1997 (the "First Amendment") and that certain Second Amendment to Amended and Restated Master Revolving Credit Agreement dated as of June 16, 1997 (the "Second Amendment"; such Amended and Restated Master Revolving Credit Agreement, as amended by the First Amendment and the Second Amendment, is hereinafter referred to collectively as the "Credit Agreement"); and WHEREAS, Guarantor has executed and delivered to the Agent and the Banks that certain Amended and Restated Unconditional Guaranty of Payment and Performance dated as of June 24, 1996 (the "Guaranty"); and WHEREAS, the parties hereto desire to enter into the Amendment to modify and amend certain terms and provisions of the Credit Agreement; and WHEREAS, as a condition to such modification, Agent and the Banks have required that Borrower and Guarantor execute this Amendment; NOW, THEREFORE, for and in consideration of the sum of TEN and NO/100 DOLLARS ($10.00), and other good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, the parties hereto do hereby covenant and agree as follows: 1. Definitions. All terms used herein which are not otherwise defined herein shall have the meanings set forth in the Credit Agreement. 2. Modification of the Credit Agreement. Borrower, Guarantor, the Banks and Agent do hereby modify and amend the Credit Agreement as follows: 2 (a) The parties hereto acknowledge that the references to "Borrowing Base" appearing in Paragraph 2(a) of the Second Amendment was inadvertent and is hereby deleted from the Second Amendment; (b) By inserting the following sentence at the end of the definition of the term "Borrowing Base" appearing in Section 1.1 of the Credit Agreement: "Notwithstanding the foregoing, the Borrowing Base attributable to a Mortgaged Property shall not exceed the amount to which recovery under the applicable Security Deed is limited unless such Security Deed is modified to increase the recovery limit to the Borrowing Base amount."; (c) By deleting in its entirety the definition of the term "Majority Banks" appearing in Section 1.1 of the Credit Agreement, and inserting in lieu thereof the following: "Majority Banks. As of any date, the Bank or Banks whose aggregate Commitment Percentage is more than sixty-six and two-thirds percent (66 2/3%); provided, that, in determining said percentage at any given time, all then existing Defaulting Banks will be disregarded and excluded and the Commitment Percentages of the Banks shall be redetermined, for voting purposes only, to exclude the Commitment Percentages of such Defaulting Banks. FNBB acknowledges and agrees that its voting rights shall be based upon its Commitment Percentage and not upon the face amount of its Note."; (d) By deleting the reference to "Section 5.7," appearing in the definition of "Special Security Documents" appearing in Section 1.1 of the Credit Agreement and inserting in lieu thereof the reference "Section 5.8,"; (e) By inserting the words "or to issue Letters of Credit" following the words "to advance proceeds of the Loan" appearing in the last two (2) lines of Section 12.1(s) of the Credit Agreement; (f) By inserting the following sentence at the end of Section 14.5(a) of the Credit Agreement: "In the event that the Agent fails to distribute such amounts within one Business Day as provided above, the Agent shall pay interest on such amount at a rate per annum equal to the Federal Funds Effective Rate from time to time in effect."; (g) By inserting the following sentence at the end of Section 14.5(b) of the Credit Agreement: "In the event that Agent shall refrain from making any distribution of any amount received by it as provided in this Section 14.5(b), Agent shall endeavor to hold such amounts in an interest bearing account and at such time as such amounts may be distributed to the Banks, Agent shall distribute to each Bank, based on their respective Commitment Percentages, its pro rata share of the interest or other earnings from such deposited amount."; and 2 3 (h) By inserting the following paragraph as a new Section 14.11 of the Credit Agreement: "Section 14.11 Removal of Agent. The Majority Banks may remove the Agent from its capacity as agent in the event of the Agent's willful misconduct or gross negligence. Such removal shall be effective upon appointment and acceptance of a successor agent selected by the Majority Banks. Any successor Agent must satisfy the conditions set forth in Section 14.9. Upon the acceptance of any appointment as agent hereunder by a successor agent, such successor agent shall thereupon succeed to and become vested with all rights, powers, privileges and duties of the removed Agent, and the removed Agent shall be discharged from all further duties and obligations as Agent under this Agreement and the Loan Documents (subject to the Agent's right to be indemnified as provided in the Loan Documents); provided that the Agent shall remain liable to the extent provided herein or in the Loan Documents for its acts or omissions occurring prior to such removal or resignation. The Commitment Percentage of the Bank which is acting as Agent shall not be taken into account in the calculation of Majority Banks for the purposes of removing Agent in the event of the Agent's willful misconduct or gross negligence." 3. References to Credit Agreement, Notes, Guaranty and Indemnity Agreement. All references in the Loan Documents to the Credit Agreement shall be deemed a reference to the Credit Agreement as modified and amended herein. 4. Consent of Guarantor. By execution of this Amendment, Guarantor hereby expressly consents to the modifications and amendments relating to the Credit Agreement as set forth herein, and Guarantor hereby acknowledges, represents and agrees that the Guaranty remains in full force and effect and constitutes the valid and legally binding obligation of Guarantor, enforceable against Guarantor in accordance with its terms, that the Guaranty extends to and applies to the foregoing documents as modified and amended, and that the execution and delivery of this Amendment does not constitute, and shall not be deemed to constitute, a release, waiver or satisfaction of Guarantor's obligations under the Guaranty. 5. No Default. By execution hereof, the Borrower and Guarantor certify that the Borrower and Guarantor are and will be in compliance with all covenants under the Loan Documents after the execution and delivery of this Amendment, and that no Default or Event of Default has occurred and is continuing. 6. Waiver of Claims. Borrower and Guarantor acknowledge, represent and agree that Borrower and Guarantor have no defenses, setoffs, claims, counterclaims or causes of action of any kind or nature whatsoever with respect to the Loan Documents, the administration or funding of the Loans or with respect to any acts or omissions of Agent or any of the Banks, or any past or present officers, agents or employees of Agent or any of the Banks, and each of 3 4 Borrower and Guarantor does hereby expressly waive, release and relinquish any and all such defenses, setoffs, claims, counterclaims and causes of action, if any. 7. Ratification. Except as hereinabove set forth, all terms, covenants and provisions of the Credit Agreement remain unaltered and in full force and effect, and the parties hereto do hereby expressly ratify and confirm the Credit Agreement as modified and amended herein. Nothing in this Amendment shall be deemed or construed to constitute, and there has not otherwise occurred, a novation, cancellation, satisfaction, release, extinguishment or substitution of the indebtedness evidenced by the Notes or the other obligations of Borrower and Guarantor under the Loan Documents. 8. Counterparts. This Amendment may be executed in any number of counterparts which shall together constitute but one and the same agreement. 9. Miscellaneous. This Amendment shall be construed and enforced in accordance with the laws of the State of Michigan. This Amendment shall be binding upon and shall inure to the benefit of the parties hereto and their respective permitted successors, successors-in-title and assigns as provided in the Loan Documents. 4 5 IN WITNESS WHEREOF, the parties hereto have hereto set their hands and affixed their seals as of the day and year first above written. BORROWER: RAMCO-GERSHENSON PROPERTIES, L.P., a Delaware limited partnership, by its sole general partner By: Ramco-Gershenson Properties Trust, a Massachusetts business trust By: /s/ Authorized Signature ----------------------------- Name: Title: [SEAL] GUARANTOR: RAMCO-GERSHENSON PROPERTIES TRUST, a Massachusetts business trust By: /s/ Authorized Signature ----------------------------- Name: Title: [SEAL] BANKBOSTON, N.A. (formerly known as The First National Bank of Boston), individually and as Agent By: /s/ JEFFREY L. WARWICK ----------------------------- Jeffrey L. Warwick, Director [BANK SEAL] NBD BANK By: /s/ Authorized Signature ----------------------------- Title: [BANK SEAL] 5