EXHIBIT 4.0 SIXTH AMENDMENT TO LETTER AGREEMENT THIS SIXTH AMENDMENT TO LETTER AGREEMENT (this "Sixth Amendment") is made and dated as of June 30, 1999 among INTERNATIONAL HOUSE OF PANCAKES, INC. (the "Borrower"), IHOP CORP., as Guarantor (the "Guarantor"), and BANK OF AMERICA NATIONAL TRUST AND SAVINGS ASSOCIATION (successor by merger to Bank of America Illinois) (the "Bank"), and amends that certain Letter Agreement between the parties dated as of June 30, 1993, as amended by a letter dated July 15, 1993 from Continental Bank to the Borrower, a First Amendment to Letter Agreement dated as of December 31, 1994, a Second Amendment to Letter Agreement dated as of March 11, 1996, a Third Amendment to Letter Agreement dated as of September 3, 1996, a Fourth Amendment to Letter Agreement dated as of November 1, 1996, a letter from the Bank to the Borrower dated June 25, 1997 and a Fifth Amendment to Letter Agreement dated as of June 30, 1998 (as so amended, the "Agreement"). RECITAL The Borrower has requested that the Bank agree to certain amendments to the Agreement, and the Bank is willing to do so on the terms and conditions set forth herein. NOW, THEREFORE, for good and valuable consideration, the receipt and adequacy of which are hereby acknowledged, the parties hereby agree as follows: 1. DEFINED TERMS. Unless otherwise defined herein, capitalized terms used herein shall have the meanings, if any, assigned to them in the Agreement. 2. AMENDMENTS TO AGREEMENT. The parties hereto agree that the Agreement is hereby amended as follows: (a) Section 1 of the Agreement is hereby amended by deleting "June 30, 2001" and inserting "June 30, 2002" in lieu thereof. (b) Section 14.12(a) of the Agreement is amended and restated in its entirety as follows: "(a) incur capital expenditures in excess of $55,000,000 per fiscal year, net of all proceeds relating to sale leaseback transactions in such fiscal year; PROVIDED, HOWEVER, that in the fiscal year ending December 31, 2000 only, the Borrower may incur capital expenditures up to $70,000,000, net of all proceeds relating to sale leaseback transactions in such fiscal year;" 3. REAFFIRMATION OF IHOP GUARANTY. IHOP does hereby reaffirm that the terms and provisions of Section 17 of the Agreement continue in full force and effect and are ratified and confirmed in all respects on and as of the date hereof, after giving effect to this Sixth Amendment. IHOP agrees that any references to the Note in the Agreement, including without limitation Section 17 of the Agreement, shall be deemed a reference to the Agreement and amounts owing thereunder, as evidenced by the loan accounts referred to in Section 3 of the Agreement, as amended hereby. 4. REPRESENTATIONS AND WARRANTIES. IHOP and the Borrower do hereby represent and warrant as follows: (a) AUTHORITY. Each of the Borrower and IHOP has been duly incorporated and is a validly existing corporation under the laws of the State of Delaware, has full legal right, power and authority to enter into this Sixth Amendment and to carry out and consummate all transactions contemplated by the Agreement and this Sixth Amendment. (b) ENFORCEABILITY. This Sixth Amendment has been duly authorized and is a valid and binding obligation of the Borrower and IHOP, enforceable in accordance with its terms. (c) NO CONFLICT. This Sixth Amendment will not conflict with or constitute a breach of or a default under their respective articles of incorporation or bylaws, or any material agreement to which the Borrower or IHOP is a party or by which the Borrower or IHOP or any of their respective properties are bound, or any rule or regulation of any court or governmental agency or body having jurisdiction over the Borrower or IHOP or any of their respective activities or properties. (d) NO EVENT OF DEFAULT. No event of Default under the Agreement has occurred and is continuing. (e) REPRESENTATIONS AND WARRANTIES. The representations and warranties in Section 11 of the Agreement are true and correct in all respects on and as of the date hereof as though made on and as of the date hereof. 5. CONDITIONS EFFECTIVENESS. The effectiveness of this Sixth Amendment shall be subject to: (a) the compliance by the Borrower with its agreements herein contained; (b) the delivery to the Bank of copies of this Sixth Amendment signed by the Company and IHOP and a Guarantor Acknowledgement and Consent (in the form attached to this Sixth Amendment) executed by IHOP Restaurants, Inc.; IHOP Properties, Inc.; and IHOP Realty Corp; (c) the delivery of such other evidence with respect to the Company, IHOP, and any other person as the Bank may reasonably request in connection with this Amendment and the compliance with the conditions set forth herein; and (d) payment by the Borrower to the Bank of an amendment fee of $10,000.00. 6. MISCELLANEOUS (a) Except as hereby expressly amended, all terms, covenants and provisions of the Agreement shall remain in full force and effect and all references to the Agreement therein and in any agreement, contract, indenture, document or instrument mentioned in the Agreement shall henceforth refer to the Agreement as amended by this Sixth Amendment. This Sixth Amendment shall be deemed incorporated into, and a part of, the Agreement. (b) This Sixth Amendment is specific in time and in intent and does not constitute, nor shall it be construed as, a waiver of any other right, power or privilege under the Agreement, or under any agreement, contract, indenture, document or instrument mentioned in the Agreement; nor does it preclude other or further exercise hereof or the exercise of any other right, power or privilege, nor shall any waiver of any right, power, privilege or default hereunder, or under any agreement, contract, 2 indenture, document or instrument mentioned in the Agreement, constitute a waiver of any other default of the same or of any other term or provision. (c) This Sixth Amendment shall be a contract made under and governed by the internal laws of the state of Illinois. (d) This Amendment may be executed in any number of counterparts, each of which shall be deemed an original, but all such counterparts together shall constitute but one and the same instrument. Each of the parties hereto understands and agrees that this document and any other document required herein) may be delivered by any party thereto either in the form of an executed original or an executed original sent by facsimile transmission to be followed promptly by mailing of a hard copy original, and that receipt by the Bank of a facsimile transmitted document purportedly bearing the signature of the Borrower and IHOP shall bind the Borrower and IHOP with the same force and effect as the delivery of a hard copy original. Any failure by the Bank to receive the hard copy executed original of such document shall not diminish the binding effect of receipt of the facsimile transmitted executed original of such document which hard copy page was not received by the Bank. IN WITNESS WHEREOF, each of the parties hereto has caused its respective duly authorized officer to execute and deliver this Sixth Amendment as of the date first written above. INTERNATIONAL HOUSE OF PANCAKES, INC. By: /s/ RICHARD K. HERZER --------------------------------- Title: PRESIDENT ------------------------------ IHOP CORP. By: /s/ RICHARD K. HERZER --------------------------------- Title: PRESIDENT ------------------------------ BANK OF AMERICA NATIONAL TRUST AND SAVINGS ASSOCIATION (SUCCESSOR BY MERGER OF BANK OF AMERICA ILLINOIS) By: /s/ RICHARD G. PARKHURST --------------------------------- Title: MANAGING DIRECTOR ------------------------------ 3 GUARANTOR ACKNOWLEDGMENT AND CONSENT The undersigned, each a guarantor with respect to the Borrower's obligations to the Bank under the Agreement, each hereby: (1) acknowledges and consents to the execution, delivery and performance by the Borrower and the Guarantor of the foregoing Sixth Amendment to Letter Agreement (the "AMENDMENT"), and (2) Reaffirms and agrees that the respective guaranty to which the undersigned is party and all other documents and agreements executed and delivered by the undersigned to the Bank in connection with the Agreement are in full force and effect, without defense, offset or counterclaim. IHOP REALTY CORP. By: /s/ RICHARD K. HERZER --------------------------------- Title: PRESIDENT ------------------------------ IHOP RESTAURANTS, INC. By: /s/ RICHARD K. HERZER --------------------------------- Title: PRESIDENT ------------------------------ IHOP PROPERTIES,INC. By: /s/ RICHARD K. HERZER --------------------------------- Title: PRESIDENT ------------------------------ 4