EXHIBIT 4.40(a) RECORDING REQUESTED BY ) AND WHEN RECORDED RETURN ) TO: ) ) Skadden, Arps, Slate, ) Meagher & Flom ) 919 Third Avenue ) New York, New York 10022 ) Attention: Jennifer ) Frederick ) FIRST AMENDMENT TO DEED OF TRUST, ASSIGNMENT OF RENTS, SECURITY AGREEMENT AND FIXTURE FILING THIS FIRST AMENDMENT TO DEED OF TRUST, ASSIGNMENT OF RENTS, SECURITY AGREEMENT AND FIXTURE FILING (this "Amendment") is made as of October __, 1998 by DEL RANCH L.P., a California limited partnership ("Del Ranch") as trustor ("Trustor"), to CHICAGO TITLE COMPANY, a California corporation, whose address is 925 B Street, San Diego, California 92101, as trustee ("Trustee") and in favor of CHASE MANHATTAN BANK AND TRUST COMPANY, NATIONAL ASSOCIATION, a national banking association organized under the laws of the United States, whose address is 101 California Street, #2725, San Francisco, California 94111, as beneficiary ("Beneficiary") acting in its capacity (a) as trustee (as successor in interest to Chemical Trust Company of California) for and on behalf of Salton Sea Funding Corporation, a Delaware corporation ("Funding Corporation"), and the Secured Parties (the "Secured Parties") under that certain Trust Indenture dated as of July 21, 1995 by and between Funding Corporation and Beneficiary, as trustee, as the same may be amended, modified or supplemented, including by that certain First Supplemental Indenture dated as of October 18, 1995, that certain Second Supplemental Indenture dated as of June 20, 1996, that certain Third Supplemental Indenture dated as of July 29, 1996, and that certain Fourth Supplemental Trust Indenture dated as of even date herewith (as so amended, modified or supplemented, the "Indenture") and (b) as collateral agent (in such capacity, the "Collateral Agent") under that certain Collateral Agency and Intercreditor Agreement dated as of July 21, 1995 as the same may be amended, modified or supplemented, including by that certain First Amendment to the Collateral Agency and Intercreditor Agreement dated as of June 20, 1996 and that certain Second Amendment to the Collateral Agency and Intercreditor Agreement dated as of even date herewith for the benefit of the Secured Parties and Funding Corporation (as so amended, modified or supplemented, the "Intercreditor Agreement"). Capitalized terms used and not defined herein shall have the meanings set forth in the Indenture. RECITALS WHEREAS, Funding Corporation is a corporation established for the sole purpose of making loans to the Guarantors from proceeds of the issuance of notes and bonds (collectively, the "Securities") in its individual capacity as principal and as agent acting on behalf of the Guarantors pursuant to the Indenture; and WHEREAS, on July 21, 1995 the Funding Corporation issued and sold Securities in the aggregate principal amount of $475, 000,000.00 (the "Initial Securities"); and WHEREAS, in connection with the issuance and sale of the Initial Securities, Trustor entered into the Partnership Secured Limited Guarantee (the "Initial Partnership Guarantee") whereby Trustor guaranteed certain of the obligations of Funding Corporation under the Initial Securities; and WHEREAS, on June 20, 1996 the Funding Corporation issued and sold Securities in the aggregate principal amount of $135,000,000.00 (the "Supplemental Securities"); and WHEREAS, in connection with the issuance and sale of the Supplemental Securities Trustor entered into various agreements and amendments to the Financing Documents including (a) that certain Deed of Trust, Assignment of Rents, Security Agreement, and Fixture Filing in favor of Trustee and for the benefit of the Secured Parties dated as of June 20, 1996 which was recorded on June 21, 1996 as instrument no. 96013776 in the official records of Imperial County, California, (b) that certain Amended and Restated Partnership Secured Limited Guarantee dated as of June 20, 1996 (the "Supplemental Partnership Guarantee") and (c) that certain Agreement Regarding Security Documents in favor of Collateral Agent and for the benefit of the Secured Parties dated as of June 20, 1996 (the "First Agreement Regarding Security Documents"); and WHEREAS, Funding Corporation has simultaneously with the execution and delivery of this Amendment issued and sold Securities in the aggregate principal amount of $285,000,000.00 (the "Additional Securities"); and WHEREAS, in connection with the issuance and sale of the Additional Securities, Trustor entered into various agreements and amendments to the Financing Documents, including (a) that certain Second Amended and Restated Partnership Guarantee (the "Additional Partnership Guarantee," together with the Initial Partnership Guarantee and the Supplemental partnership Guarantee, the "Partnership Guarantee") and (b) that certain Second Agreement Regarding Security Documents dated as of the date hereof, by and among Trustor, Beneficiary and the other parties named therein (the "Second Agreement Regarding Security Documents") supplementing the Partnership Guarantee and acknowledging that the obligations guaranteed by the Partnership Guarantee include the obligations of Funding Corporation under the Additional Securities; and WHEREAS, the parties wish to amend the Deed of Trust to expressly provide that it secures Trustor's obligations under the Partnership Guarantee and the other Financing Documents, as so amended, modified or supplemented, including pursuant to the Second Agreement Regarding Security Documents. AGREEMENT NOW, THEREFORE, in consideration of good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereto hereby agree as follows: 1. Financing Documents. The term Financing Documents, as used in the Deed of Trust, is hereby expressly made to include (to the extent it does not now so include), without limitation: (a) the Trust Indenture, dated as of July 21, 1995, as amended by the First Supplemental Indenture dated as of October 18, 1995, the Second Supplemental Indenture dated as of June 20, 1996, the Third Supplemental Indenture dated as of July 29, 1996 and the Fourth Supplemental Indenture dated as of even date herewith; (b) the $285,000,000 7.475% Senior Secured Series F Bonds issued as of even date herewith by the Funding Corporation; (c) the Exchange and Registration Rights Agreement, dated as of even date herewith, among the Funding Corporation, Credit Suisse First Boston Corporation and Goldman, Sachs & Co.; (d) the Amended and Restated Deposit and Disbursement Agreement, dated as of even date herewith, among the Funding Corporation, the Guarantors, the Collateral Agent and the Depositary Agent; (e) the Collateral Agency and Intercreditor Agreement, dated as of July 21, 1995, as amended by the First Amendment to Collateral Agency and Intercreditor Agreement dated as of June 20, 1996 and the Second Amendment to Collateral Agency and Intercreditor Agreement dated as of even date herewith, among the Funding Corporation, the Guarantors, the Secured Parties named therein, the Depositary Agent and the Collateral Agent; (f) the Equity Commitment Agreement, dated as of even date herewith, among CalEnergy, the Guarantors and the Collateral Agent; (g) the Amended and Restated Debt Service Reserve Letter of Credit and Reimbursement Agreement, dated as of June 20, 1996, as amended by the Amendment to Notes and to Amended and Restated Debt Service Reserve Letter of Credit and Reimbursement Agreement dated as of even date herewith, among the Funding Corporation, the Debt Service LOC Provider and the other banks named therein; (h) the Amended and Restated Credit Agreement (Salton Sea Guarantors), dated as of even date herewith, among the Funding Corporation and the Salton Sea Guarantors; (i) the Second Amended and Restated Credit Agreement (Partnership Guarantors), dated as of even date herewith, among the Funding Corporation and the Partnership Guarantors; (j) the promissory note in the amount of $246,483,000, dated as of even date herewith, executed by the Salton Sea Guarantors in favor of the Funding Corporation; (k) the promissory note in the amount of $83,272,000, dated as of even date herewith, executed by the Salton Sea Guarantors in favor of the Funding Corporation; (l) the promissory note in the amount of $24,579,000, dated as of even date herewith, executed by the Partnership Guarantors in favor of the Funding Corporation; (m) the promissory note in the amount of $93,150,000, dated as of even date herewith, executed by the Partnership Guarantors in favor of the Funding Corporation; (n) the promissory note in the amount of $201,728,000, dated as of even date herewith, executed by the Partnership Guarantors in favor of the Funding Corporation; (o) the Amended and Restated Salton Sea Secured Guarantee, dated as of even date herewith, by the Salton Sea Guarantors in favor of the Trustee and the Collateral Agent; and (p) the Second Amended and Restated Partnership Secured Limited Guarantee, dated as of even date herewith, by the Partnership Guarantors in favor of the Trustee and the Collateral Agent. 2. Effect of This Amendment. On and after the date of this Amendment, each reference in the Deed of Trust to the Deed of Trust, shall mean the Deed of Trust as amended hereby. Except as specifically amended above, the Deed of Trust shall remain in full force and effect and is hereby ratified and confirmed. The execution, delivery and effectiveness of this Amendment shall not, except as expressly provided herein, operate as a waiver of any right, power, or remedy of Beneficiary or any of the Secured Parties nor constitute a waiver of any provision of the Deed of Trust. 3. Headings. The headings, titles and captions of various Sections of this Amendment are for convenience of reference only and are not to be construed as defining or limiting, in any way, the scope or intent of the provisions hereof. 4. Governing Law. THIS AMENDMENT IS GOVERNED BY AND SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF CALIFORNIA. 5. Counterparts. This Amendment may be signed in any number of counterparts, each of which shall be an original, with the same effect as if the signatures thereto and hereto were upon the same instrument. [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK] IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed, and this Amendment shall be effective, as of the day and year first above written. DEL RANCH, L.P., a California limited partnership By: CalEnergy Operating Corporation, a Delaware corporation, its general partner By: /s/ Craig M. Hammett Name: Craig M. Hammett Title: Senior Vice President CHASE MANHATTAN BANK AND TRUST COMPANY, NATIONAL ASSOCIATION, a national banking association organized under the laws of the United States, as Collateral Agent By: /s/ Rose T. Maravilla Name: Rose T. Maravilla Title: Assistant Vice President