1 Exhibit 10.4 GUARANTY AGREEMENT THIS GUARANTY AGREEMENT (this "Agreement") is made and given as of this 24th day of December, 1997, by CANDLEWOOD HOTEL COMPANY, INC., a Delaware corporation (the "Guarantor"), for the benefit of HP CW PROPERTIES TRUST, a Maryland real estate investment trust (the "Landlord"), and HOSPITALITY PROPERTIES TRUST, a Maryland real estate investment trust and the sole stockholder of Landlord (together with the Landlord and their respective successors and assigns, "HPT"). W I T N E S S E T H : WHEREAS, pursuant to an Agreement to Lease, dated November 19, 1997 (the "Agreement to Lease"), the Landlord and Candlewood Leasing No. 1, Inc., a Delaware corporation (the "Tenant"), are, on the date hereof, entering into a Lease Agreement (the "Initial Lease") with respect to certain real property, the related improvements and personal property, as more particularly described therein; and WHEREAS, the Agreement to Lease contemplates that the Initial Lease will be amended to add to the premises demised thereunder certain additional Candlewood hotels described in the Purchase Agreement and Agreement to Lease pursuant to certain amendments to be entered into pursuant to the Agreement to Lease (collectively, the "Amendments" and the Initial Lease, as amended by the Amendments, the "Lease"); and WHEREAS, it is a condition precedent to the Landlord's entering into the Lease that the Guarantor guarantee all of the payment and performance obligations of the Tenant with respect to the Lease; and WHEREAS, the transactions contemplated by the Lease are of direct material benefit to the Guarantor; NOW, THEREFORE, in consideration of the foregoing and for other good and valuable consideration, the mutual receipt and legal sufficiency of which are hereby acknowledged, the parties hereto hereby agree as follows: 1. .CERTAIN TERMS. Capitalized terms used and not otherwise defined in this Agreement shall have the meanings ascribed to such terms in the Lease. The Lease and the Incidental Documents are herein collectively referred to as the "Transaction Documents." 2. GUARANTEED OBLIGATIONS. For purposes of this Agreement, the term "Guaranteed Obligations" shall mean the payment and performance of each and every obligation of the Tenant to HPT under the Transaction Documents, whether now existing or hereafter arising, and including, without limitation, the payment of the full amount of the Rent payable under the Lease. 2 3. REPRESENTATIONS AND COVENANTS. The Guarantor represents, warrants, covenants and agrees that: 3.1. PERFORMANCE OF COVENANTS AND AGREEMENTS. Subject to the limitations set forth in Section 20, during the term of this Agreement, the Guarantor will cause the Tenant duly and punctually to perform all of the covenants and agreements of Tenant set forth in the Transaction Documents. 3.2. VALIDITY OF AGREEMENT. The Guarantor has duly and validly executed and delivered this Agreement; this Agreement constitutes the legal, valid and binding obligation of the Guarantor, enforceable against the Guarantor in accordance with its terms, except as enforceability may be limited by bankruptcy, insolvency, reorganization, moratorium or similar laws of general application affecting the rights and remedies of creditors; and the execution, delivery and performance of this Agreement have been duly authorized by all requisite action of the Guarantor and such execution, delivery and performance by the Guarantor will not result in any breach of the terms, conditions or provisions of, or conflict with or constitute a default under, or result in the creation of any lien, charge or encumbrance upon any of the property or assets of the Guarantor pursuant to the terms of, any indenture, mortgage, deed of trust, note, other evidence of indebtedness, agreement or other instrument to which the Guarantor is a party or by which the Guarantor or any property or assets of the Guarantor is bound, or violate any provision of law applicable to the Guarantor, or any order, writ, injunction, judgement or decree of any court applicable to the Guarantor or any order or other public regulation of any governmental commission, bureau or administrative agency applicable to the Guarantor. 3.3. PAYMENT OF EXPENSES. The Guarantor agrees, as principal obligor and not as Guarantor only, to pay to HPT forthwith, upon demand, in immediately available Federal funds, all costs and expenses (including court costs and reasonable legal expenses) incurred or expended by HPT in connection with the enforcement of this Agreement, together with interest on amounts recoverable under this Agreement from the time such amounts become due until payment at the Interest Rate. 3.4. REPORTS. The Guarantor shall promptly provide to HPT each of the financial reports, certificates and other documents required of the Guarantor under the Transaction Documents. 3.5. LEGAL EXISTENCE. The Guarantor shall do or cause to be done all things necessary to preserve and keep in full force and effect its corporate existence. 4. GUARANTEE. The Guarantor hereby unconditionally guarantees that the Guaranteed Obligations which are monetary obligations which become due and payable during the term of this Agreement shall be paid in full when due and payable, whether upon demand, at the stated or accelerated maturity thereof or upon any mandatory or voluntary prepayment pursuant to any Transaction Document, or otherwise, and that the Guaranteed Obligations which are performance obligations which are required to be performed during the term of this Agreement shall be fully performed at the times and in the manner such performance is required by the Transaction Documents. With respect to the Guaranteed Obligations which are monetary 2 3 obligations, this guarantee is a guarantee of payment and not of collectibility and is absolute and in no way conditional or contingent. In case any part of the Guaranteed Obligations shall not have been paid when due and payable or performed at the time performance is required, the Guarantor shall, within five (5) days after receipt of notice from HPT, pay or cause to be paid to HPT the amount thereof as is then due and payable and unpaid (including interest and other charges, if any, due thereon through the date of payment in accordance with the applicable provisions of the Transaction Documents) or perform or cause to be performed such obligations in accordance with the Transaction Documents. 5. UNENFORCEABILITY OF GUARANTEED OBLIGATIONS, ETC. If the Tenant is for any reason under no legal obligation to discharge any of the Guaranteed Obligations, or if any other moneys included in the Guaranteed Obligations have become unrecoverable from the Tenant by operation of law or for any other reason, including, without limitation, the invalidity or irregularity in whole or in part of any Guaranteed Obligation or of any Transaction Document or any limitation on the liability of the Tenant thereunder or any limitation on the method or terms of payment thereunder which may now or hereafter be caused or imposed in any manner whatsoever, the guarantees contained in this Agreement shall nevertheless remain in full force and effect in accordance with the terms set forth herein and shall be binding upon the Guarantor to the same extent as if the Guarantor at all times had been the principal debtor on all such Guaranteed Obligations. 6. ADDITIONAL GUARANTEES. This Agreement shall be in addition to any other guarantee or other security for the Guaranteed Obligations and it shall not be prejudiced or rendered unenforceable by the invalidity of any such other guarantee or security or by any waiver, amendment, release or modification thereof. 7. CONSENTS AND WAIVERS, ETC. The Guarantor hereby acknowledges receipt of correct and complete copies of each of the Transaction Documents and consents to all of the terms and provisions thereof, as the same may be from time to time hereafter amended or changed in accordance therewith, and waives, to the extent the Guarantor lawfully may do so, (a) presentment, demand for payment, and protest of nonpayment, of any of the Guaranteed Obligations, (b) notice of acceptance of this Agreement and of diligence, presentment, demand and protest, (c) notice of any default hereunder and any default, breach or nonperformance or Event of Default under any of the Guaranteed Obligations or the Transaction Documents, except as expressly provided in Section 4, (d) notice of the terms, time and place of any private or public sale of collateral held as security for the Guaranteed Obligations, (e) demand for performance or observance of, and any enforcement of any provision of, or any pursuit or exhaustion of rights or remedies against the Tenant or any other guarantor of the Guaranteed Obligations, under or pursuant to the Transaction Documents, or any agreement directly or indirectly relating thereto and any requirements of diligence or promptness on the part of the holders of the Guaranteed Obligations in connection therewith, and (f) any and all demands and notices of every kind and description with respect to the foregoing or which may be required to be given by any statute or rule of law. 8. NO IMPAIRMENT, ETC. The obligations, covenants, agreements and duties of the Guarantor under this Agreement shall not be affected or impaired by any assignment or transfer in 3 4 whole or in part of any of the Guaranteed Obligations without notice to the Guarantor, or any waiver by HPT or any holder of any of the Guaranteed Obligations or by the holders of all of the Guaranteed Obligations of the performance or observance by the Tenant or any other guarantor of any of the agreements, covenants, terms or conditions contained in the Guaranteed Obligations or the Transaction Documents or any indulgence in or the extension of the time for payment by the Tenant or any other guarantor of any amounts payable under or in connection with the Guaranteed Obligations or the Transaction Documents or any other instrument or agreement relating to the Guaranteed Obligations or of the time for performance by the Tenant or any other guarantor of any other obligations under or arising out of any of the foregoing or the extension or renewal thereof, or the modification or amendment (whether material or otherwise) of any duty, agreement or obligation of the Tenant or any other guarantor set forth in any of the foregoing, or the voluntary or involuntary sale or other disposition of all or substantially all the assets of the Tenant or any other guarantor or insolvency, bankruptcy, or other similar proceedings affecting the Tenant or any other guarantor or any assets of the Tenant or any such other guarantor, or the release or discharge of the Tenant or any such other guarantor from the performance or observance of any agreement, covenant, term or condition contained in any of the foregoing without the consent of the holders of the Guaranteed Obligations by operation of law. 9. REIMBURSEMENT, SUBROGATION, ETC. The Guarantor hereby covenants and agrees that the Guarantor will not enforce or otherwise exercise any rights of reimbursement, subrogation, contribution or other similar rights against the Tenant or any other person with respect to the Guaranteed Obligations prior to the payment in full of all amounts then due and owing but unpaid with respect to the Lease, and until the Guaranteed Obligations have been satisfied in full, the Guarantor shall not have any right of subrogation, and the Guarantor waives any defense it may have based upon any election of remedies by HPT which destroys the Guarantor's subrogation rights or the Guarantor's rights to proceed against the Tenant for reimbursement, including, without limitation, any loss of rights the Guarantor may suffer by reason of any rights, powers or remedies of the Tenant in connection with any anti-deficiency laws or any other laws limiting, qualifying or discharging the indebtedness to HPT. Until all obligations of the Tenant pursuant to the Transaction Documents shall have been paid and satisfied in full, the Guarantor waives any right to enforce any remedy which HPT now has or may in the future have against the Tenant, any other guarantor or any other person and any benefit of, or any right to participate in, any security whatsoever now or in the future held by HPT. 10. DEFEASANCE. (a) Unless sooner terminated pursuant to paragraph (b) below, this Agreement shall terminate at such time as the Guaranteed Obligations have been paid and performed in full and all other obligations of the Guarantor to HPT under this Agreement have been satisfied in full; provided, however, if at any time, all or any part of any payment applied on account of the Guaranteed Obligations is or must be rescinded or returned for any reason whatsoever (including, without limitation, the insolvency, bankruptcy or reorganization of the Tenant), this Agreement, to the extent such payment is or must be rescinded or returned, shall be deemed to have continued in existence notwithstanding any such termination. (b) Provided that (x) no (i) monetary Default, (ii) Default as to which Notice thereof has been given to Tenant or (iii) Event of Default shall have occurred and be continuing under the Lease, (y) Cash Flow (as defined below) on a cumulative basis for a period of twelve 4 5 (12) full consecutive Accounting Periods equals or exceeds Minimum Rent by fifty percent (50%) with respect to such period, and (z) HPT shall receive a schedule evidencing the foregoing, in form and substance reasonably satisfactory to HPT prepared by a, so-called, "Big-Six" accounting firm or such other certified public accountants as are approved by HPT (such approval not to be unreasonably withheld, delayed or conditioned), this Agreement shall terminate ten (10) Business Days after delivery to HPT of the financial statements described in clause (z) preceding, and HPT shall, within ten (10) Business Days after the written request of the Guarantor, confirm such termination by executing a release of the Guarantor from all obligations and liabilities arising under this Agreement subsequent to the release date and returning any unapplied balance of the Guaranty Retained Funds (as hereinafter defined) to the Guarantor, together with any accrued and unpaid interest thereon. As used herein, "CASH FLOW" shall mean the net income before federal and state income tax (or loss) of the Tenant in connection with the operation of the Hotels, calculated in accordance with GAAP for the applicable period, as illustrated in Exhibit A attached hereto, adjusted by adding back (a) all extraordinary expense items, (b) depreciation and amortization, (c) interest expense on Indebtedness permitted under the Lease, (d) Minimum Rent and Additional Rent, (e) base management fees, incentive management fees, trade name fees, franchise fees, royalty fees and central marketing fees paid to the Manager to the extent subordinate to payment of rent pursuant to the Lease from and after the occurrence of an Event of Default, and further adjusted by deducting (f) required contributions to the FF&E Reserve and (g) all extraordinary income items. 11. SECURITY FOR GUARANTY. As security for the obligations of the Guarantor hereunder, HPT has retained from the aggregate purchase prices of the Properties pursuant to the Purchase Agreement, the sum of Five Million Dollars ($5,000,000) (the "Guaranty Retained Funds"). HPT shall have no obligation to hold the Guaranty Retained Funds in a segregated account and may commingle the same with its general funds. Provided that no Event of Default shall have occurred and be continuing, HPT shall credit the Guarantor or its assigns with interest on any unapplied balance of the Guaranty Retained Funds at a rate of 11.11% per annum. Such interest shall be credited in arrears and pro rated with respect to any partial month. Provided that (x) no (i) monetary Default, (ii) Default as to which Notice thereof has been given to Tenant or (iii) Event of Default shall have occurred and be continuing under the Lease, (y) Cash Flow on a cumulative basis for a period of twelve (12) full consecutive Accounting Periods equals or exceeds Minimum Rent by forty percent (40%) with respect to such period, and (z) HPT shall receive a schedule evidencing the foregoing, in form and substance reasonably satisfactory to HPT prepared by certified public accountants approved by HPT (such approval not to be unreasonably withheld, delayed or conditioned), HPT shall, within ten (10) Business Days after the written request of the Guarantor, pay any unapplied balance of the Guaranty Retained Funds, together with any accrued and unpaid interest with respect thereto, to the Guarantor. At the written request of the Guarantor, HPT shall credit accrued interest on the Guaranty Retained Funds against the monthly Minimum Rent. 12. NOTICES. (a) Any and all notices, demands, consents, approvals, offers, elections and other communications required or permitted under this Agreement shall be deemed adequately given if in writing and the same shall be delivered either in hand, by telecopier with 5 6 written acknowledgment of receipt, or by mail or Federal Express or similar expedited commercial carrier, addressed to the recipient of the notice, postpaid and registered or certified with return receipt requested (if by mail), or with all freight charges prepaid (if by Federal Express or similar carrier). (b) All notices required or permitted to be sent hereunder shall be deemed to have been given for all purposes of this Agreement upon the date of acknowledged receipt, in the case of a notice by telecopier, and, in all other cases, upon the date of receipt or refusal, except that whenever under this Agreement a notice is either received on a day which is not a Business Day or is required to be delivered on or before a specific day which is not a Business Day, the day of receipt or required delivery shall automatically be extended to the next Business Day. (c) All such notices shall be addressed, if to HPT to: c/o Hospitality Properties Trust 400 Centre Street Newton, Massachusetts 02158 Attn: Mr. John G. Murray [Telecopier No. (617) 969-5730] with a copy to: Sullivan & Worcester LLP One Post Office Square Boston, Massachusetts 02109 Attn: Jennifer B. Clark, Esq. [Telecopier No. (617) 338-2880] if to the Guarantor to: Candlewood Hotel Company, Inc. Lakepoint Office Park 9342 East Central Witchita, Kansas 67206 Attn: Mr. Jack P. DeBoer [Telecopier No. (316) 631-1333] 6 7 with a copy to: Latham & Watkins 701 B Street, Suite 2100 San Diego, CA 92101 Attn: Jon D. Demorest, Esq. [Telecopier No. (619) 696-7419] (d) By notice given as herein provided, the parties hereto and their respective successors and assigns shall have the right from time to time and at any time during the term of this Agreement to change their respective addresses effective upon receipt by the other parties of such notice and each shall have the right to specify as its address any other address within the United States of America. 13. SUCCESSORS AND ASSIGNS. Whenever in this Agreement, any of the parties hereto is referred to, such reference shall be deemed to include the successors and assigns of such party, including without limitation the holders, from time to time, of the Guaranteed Obligations; and all representations, warranties, covenants and agreements by or on behalf of the Guarantor which are contained in this Agreement shall inure to the benefit of HPT's successors and assigns, including, without limitation, such holders, whether so expressed or not; provided, however, that, if HPT shall transfer the Guaranty Retained Funds to a person having a Net Worth less than ten (10) times the unapplied balance thereof, HPT shall guaranty repayment thereof and payment of any accrued interest thereon to the Guarantor in accordance with the terms of this Agreement pursuant to a guaranty in form and substance reasonably satisfactory to the Guarantor. 14. APPLICABLE LAW. Except as to matters regarding the internal affairs of HPT and issues of or limitations on any personal liability of the shareholders and trustees of HPT for obligations of HPT, as to which the laws of the State of Maryland shall govern, this Agreement and any other instruments executed and delivered to evidence, complete or perfect the transactions contemplated hereby shall be interpreted, construed, applied and enforced in accordance with the laws of The Commonwealth of Massachusetts applicable to contracts between residents of Massachusetts which are to be performed entirely within Massachusetts, regardless of (i) where any such instrument is executed or delivered; or (ii) where any payment or other performance required by any such instrument is made or required to be made; or (iii) where any breach of any provision of any such instrument occurs, or any cause of action otherwise accrues; or (iv) where any action or other proceeding is instituted or pending; or (v) the nationality, citizenship, domicile, principal place of business, or jurisdiction of organization or domestication of any party; or (vi) whether the laws of the forum jurisdiction otherwise would apply the laws of a jurisdiction other than Massachusetts; or (vii) any combination of the foregoing. To the maximum extent permitted by applicable law, any action to enforce, arising out of, or relating in any way to, any of the provisions of this Agreement may be brought and prosecuted in such court or courts located in The Commonwealth of Massachusetts as may be provided by law; and the parties consent to the jurisdiction of said court or courts located in Massachusetts 7 8 and to service of process by registered mail, return receipt requested, or by any other manner provided by law. 15. MODIFICATION OF AGREEMENT. No modification or waiver of any provision of this Agreement, nor any consent to any departure by the Guarantor therefrom, shall in any event be effective unless the same shall be in writing and signed by HPT, and such modification, waiver or consent shall be effective only in the specific instances and for the purpose for which given. No notice to or demand on the Guarantor in any case shall entitle the Guarantor to any other or further notice or demand in the same, similar or other circumstances. 16. WAIVER OF RIGHTS BY HPT. Neither any failure nor any delay on HPT's part in exercising any right, power or privilege under this Agreement shall operate as a waiver thereof, nor shall a single or partial exercise thereof preclude any other or further exercise or the exercise of any other right, power or privilege. 17. SEVERABILITY. In case any one or more of the provisions contained in this Agreement should be invalid, illegal or unenforceable in any respect, the validity, legality and enforceability of the remaining provisions contained herein shall not in any way be affected or impaired thereby, but this Agreement shall be reformed and construed and enforced to the maximum extent permitted by applicable law. 18. ENTIRE CONTRACT. This Agreement constitutes the entire agreement between the parties hereto with respect to the subject matter hereof and shall supersede and take the place of any other instruments purporting to be an agreement of the parties hereto relating to the subject matter hereof. 19. HEADINGS; COUNTERPARTS. Headings in this Agreement are for purposes of reference only and shall not limit or otherwise affect the meaning hereof. This Agreement may be executed in any number of counterparts, each of which shall be an original, but all of which together shall constitute one instrument, and in pleading or proving any provision of this Agreement, it shall not be necessary to produce more than one of such counterparts. 20. REMEDIES CUMULATIVE. No remedy herein conferred upon HPT is intended to be exclusive of any other remedy, and each and every remedy shall be cumulative and shall be in addition to every other remedy given hereunder or now or hereafter existing at law or in equity or by statute or otherwise. 8 9 WITNESS the execution hereof under seal as of the date above first written. CANDLEWOOD HOTEL COMPANY, INC. By: /s/ PAMELA CLOUD ------------------------- Its: Assistant Secretary ACKNOWLEDGED AND AGREED: HP CW PROPERTIES TRUST By: /s/ JOHN G. MURRAY ------------------------------ Its: President HOSPITALITY PROPERTIES TRUST By: /s/ JOHN G. MURRAY ----------------------------- Its: President 9