EXHIBIT 10-5 SIXTH AMENDMENT TO AMENDED AND RESTATED MORTGAGE LOAN WAREHOUSING AGREEMENT This Sixth Amendment to Amended and Restated Mortgage Loan Warehousing Agreement (the "Amendment") is dated as of this 10th day of September, 1997, by and among, BANK OF AMERICA NATIONAL TRUST AND SAVINGS ASSOCIATION, a national banking association ("BOA"), and the other banks signatory hereto from time to time (each a "Lender" and, collectively, the "Lenders"), BOA as agent for the Lenders (in such capacity, the "Agent") and FIRST MORTGAGE CORPORATION, a California corporation (the "Company"). RECITALS A. Pursuant to that certain Amended and Restated Mortgage Loan Warehousing Agreement dated as of September 1, 1995 by and among BOA, the Agent and the Company (as amended from time to time, the "Agreement"), BOA agreed to extend credit to the Company on the terms and subject to the conditions set forth therein. All capitalized terms not otherwise defined herein shall have the meanings given to such terms in the Agreement. B. The Company and the Lenders desire to amend the Agreement in certain respects, all as set forth more particularly herein. NOW, THEREFORE, in consideration of the foregoing Recitals and for other good and valuable consideration, the receipt and adequacy of which are hereby acknowledged, the parties hereto hereby agree as follows: AGREEMENT 1. Change in Definition of Credit Limit. To reflect the agreement of the parties to increase the Credit Limit, the definition of "Credit Limit" in Section 11 of the Agreement is amended by replacing "$30,000,000" with "$40,000,000". 2. Reaffirmation of Security Agreement. Other than as amended pursuant to Paragraph 1 above, the Company hereby affirms and agrees that (a) the execution and delivery by the Company of and the performance of its obligations under this Amendment shall not in any way amend, impair, invalidate or otherwise affect any of the obligations of the Company or the rights of the Secured Parties under the Security Agreement or any other document or instrument made or given by the Company in connection therewith, (b) the term "Obligations" as used in the Security Agreement includes, without limitation, the Obligations of the Company under the Agreement as amended hereby, and (c) the Security Agreement remains in full force and effect in that such agreement constitutes a continuing first priority security interest in and lien upon the Collateral. 3. Effective Date. This Amendment shall be effective as of the date (the "Effective Date") that: (a) All parties signatory hereto have executed and delivered this Amendment to BOA; and (b) BOA has received such board resolutions, incumbency certificates and other additional documentation as it may request in connection herewith. 4. No Other Amendment. Except as expressly amended herein, the Agreement and the other Loan Documents shall remain in full force and effect as currently written. 5. Counterparts. This Amendment may be executed in any number of counterparts, each of which when so executed shall be deemed to be an original and all of which when taken together shall constitute one and the same agreement. 6. Representations and Warranties. The Company hereby represents and warrants to the Agent and the Lenders as follows: (a) The Company has the corporate power and authority and the legal right to execute, deliver and perform this Amendment and all documents, instruments and agreements executed and delivered by the Company in connection therewith (collectively, the "Amendment Documents") and has taken all necessary corporate action to authorize the execution, delivery and performance of the Amendment Documents. The Amendment Documents have been duly executed and delivered on behalf of the Company and constitute legal, valid and binding obligations of the Company, enforceable against the Company in accordance with their respective terms. (b) At and as of the date of execution hereof and at and as of the effective date of this Amendment and both prior to and after giving effect to the Amendment Documents: (1) complete in all respects, and (2) there has not occurred an Event of Default or Potential Default under the Agreement. IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed as of the day and year first above written. FIRST MORTGAGE CORPORATION, a California corporation By: Name: Clement Ziroli Title: Chairman Percentage Shares: 100% BANK OF AMERICA NATIONAL TRUST AND SAVINGS ASSOCIATION, a national banking association, as Agent and as Lender By: Name: Thomas A. Pizurie Title: Vice President