EXHIBIT 10.38 FIRST AMENDMENT TO EXTENSION AND MODIFICATION AGREEMENT THIS FIRST AMENDMENT TO EXTENSION AND MODIFICATION AGREEMENT ("Amendment") is made effective as of April 30, 1999, by and between UNION BANK CALIFORNIA, N.A., formerly known as The Bank of California, N.A. ("Bank") and EMCON, a California corporation. This Amendment amends that certain Extension and Modification Agreement by and between Bank and borrower dated as of March 19, 1999 (as amended or supplemented, or renewed from time to time, the "Agreement"). RECITALS A. Pursuant to the Agreement, the parties agreed to certain extensions and modifications of the Loan documents. Each capitalized term not otherwise defined in this Amendment shall have the meaning set forth in the Agreement. B. The following documents evidence Borrower's obligations to and relationship with Bank: this Amendment, the Agreement, the Replacement Line of Credit Note, the Term Note, the Credit Agreement, the Security Agreements, the Additional Security Agreement, the SLC Agreement and the UCC-1. The documents described above, together with any other documents executed by or among the parties in connection with the Liabilities, and any and all amendments and modifications thereto, are referred to collectively in this Agreement as "Loan Documents". There are no written or oral agreements concerning or affecting the Liabilities between Borrower on the one hand and Bank on the other, other than the Loan Documents. Unless otherwise defined herein, all capitalized terms shall have the meanings assigned to them in the Loan Documents. C. As of April 27, 1999, the outstanding principal balance under the Replacement Line of Credit Note was $1,619,419.75, plus accrued and unpaid interest in the amount of $16,776.59, together with all accruing interest, fees, costs and expenses provided in the Loan Documents. D. The Replacement Line of Credit Note will mature April 30, 1999 and Borrower will not satisfy its obligations to Bank thereunder and Borrower is not in compliance with the profitability covenant set forth in the Agreement ("Designated Defaults"). Borrower acknowledges that it has received adequate and reasonable notice of the Designated Defaults from Bank, and that Bank has not waived any of such defaults or any of its rights with respect to the Designated Defaults or any other breach by Borrower of the Loan Documents. E. Because of the existence of the Designated Defaults, Bank has the current right to exercise any and all of its rights and remedies against Borrower or otherwise under applicable law or in equity and the other Loan Documents. F. Borrower has requested that Bank further extend the maturity date of the Line of Credit. Although Bank is under no obligation to do so, Bank is willing to modify and extend the Line of Credit for the period set forth herein on the terms an condition set forth in this Amendment. Bank is entering into this Amendment to allow Borrower additional time to ensure the full repayment of the Liabilities. Borrower has assured Bank that its financial position will not deteriorate during the extension period requested and that Borrower shall perform in accordance with the Replacement Line of Credit Note, as amended by this Amendment. 22 NOW THEREFORE, in consideration of the foregoing and for other valuable consideration, the receipt and sufficiency of which are hereby acknowledged, Bank and hereby agree as follows: 1. Incorporation of Recitals. Each of the above recitals is incorporated herein and deemed to be the agreement of the Bank and Borrower and is relied upon by each party to this Amendment in agreeing to the terms of this Amendment. 2. Confirmation of Collateral. Borrower hereby grants and confirms that all obligations of Borrower to Bank are secured by a duly perfected security interest of first priority in the Collateral. 3. Confirmation of Representations and Warranties. Borrower hereby confirms all representations and warranties contained in the Agreement and the other Loan Documents and reaffirms all covenants set forth therein through and including the date of this Amendment. Further, Borrower certifies that, as of the date of this Amendment, there exists no Event of Default as defined in the Loan Documents other than the Designated Defaults, nor any conditions, act or event which with the giving of notice or the passage of time or both would constitute an Event of Default. 4. Borrower's Covenants. Unless Bank otherwise consents in writing during the extension period provided herein, Borrower will do the following: (a) Comply with all requirements of all Loan Documents to the extent not inconsistent with this Agreement. (b) On or before May 28, 1999, Borrower shall obtain or cause to be obtained from Charter One, in form and substance satisfactory to Bank, a UCC-1 Termination Statement terminating Charter One's security interest in Borrower's accounts, as such term is defined in Charter One's UCC Financing Statement. 5. Conditions Precedent. Borrower understands that this Amendment shall not be effective and Bank shall have no obligation to amend the terms of the Agreement or the other Loan Documents as provided herein unless and until each of the following conditions precedent has been satisfied not later than May 5, 1999, or waived by Bank (in Bank's sole discretion): (a) Borrower shall have executed and delivered to Bank this Amendment. (b) Borrower shall have taken any and all actions and executed and delivered to Bank any and all documents necessary or appropriate in Bank's sole discretion to effectuate this Amendment. (c) Borrower shall have reimbursed Bank for Bank's costs and expenses, including, without limitation, reasonable attorneys' fees and expenses (including the fees of Bank's inside counsel) incurred in connection with the negotiation and drafting of this Amendment and the transactions contemplated hereby. (d) Borrower shall have paid to Bank a non-refundable extension fee in the amount of $25,000.00. 23 6. Waiver of Defaults. Subject to all of the terms and conditions of this Amendment, including, without limitation, the requirements of Section 5 hereof, Bank hereby agrees to waive its default rights in connection with the Designated Defaults, provided, however, that this waiver is not a waiver of any subsequent breach of the same provision of the Replacement Line of Credit Note or other Loan Documents, nor is it a waiver of any current or future breach of any other provision of the Replacement Line of Credit Note or other Loan Documents. Bank is not obligated to provide this or any other waiver of its default rights. Further, the Bank reserves all of the rights, powers and remedies available to it under applicable law or in equity and under the Replacement Line of Credit Note and any other Loan Documents if any subsequent breach of the same provisions or any other provision of the Replacement Line of Credit Note or any other Loan Document should occur. 7. Amendment of Agreement and Loan Documents. To induce Bank to enter into this Amendment, Borrower agrees that the Agreement and Loan Documents are hereby supplemented and amended as follows, which amendments shall supersede and prevail over any conflicting provisions of the Agreement and/or Loan Documents: (a) The date "April 30, 1999" in the paragraph entitled "Termination Date" in Article One of the Credit Agreement is hereby amended to "August 31, 1999". (b) Section 2.1.1 of the Credit Agreement is hereby deleted in its entirety and replacement with the following: "2.1.1 Line of Credit. Subject to the terms and conditions of this Agreement from time to time prior to the Termination Date, upon request by Borrower, Bank will provide extensions of credit ("Line of Credit") to Borrower in the form of Advances and Letters of Credit that, in the aggregate, shall not exceed at any time FIVE MILLION AND NO/100 DOLLARS ($5,000,000.00) ("Credit Limit"). (a) Advances. Provides up to the Credit Limit in aggregate outstanding principal amounts ("Advance Sublimit") in Advances to Borrower. Each Advance shall be payable not later than the Termination Date. Borrower may borrow, repay and reborrow under the Advance Sublimit, as Borrower may elect, in minimum amounts of $10,000.00 or integral multiples thereof. Advances shall be used by Borrower for the purpose of working capital for its own operations. (b) Credit Limits. If at any time and Sublimit, or the Credit Limit, as a whole, has been exceeded, Borrower shall, immediately after demand by Bank, repay such excess, or, as Bank might specify, cash secure such excess". Notwithstanding any other provisions of this Agreement or any Loan Document, upon the Termination Date, all sums of interest, principal and any other amounts owing under any Loan Documents shall be immediately due and payable (with Bank also having the immediate right to full cash prepayment for the unpaid amounts of all outstanding Letters of Credit) without notice of default, presentment or demand for payment, protest or notice of nonpayment or dishonor or any other notices or demands. The Loan Documents are hereby modified to reflect 24 this change in the terms of the Facilities. 8. Release. Borrower hereby, for itself, its successors, heirs, executors, administrators and assigns (each a "Releasing Party" and collectively, the "Releasing Parties"), releases, acquits and forever discharges Bank, its directors, officers, employees, agents, affiliates, successors, administrators and assigns ("Released Parties") of and from any and all claims, actions, causes of action, demands, rights, damages, costs, loss of service, expenses and compensation whatsoever which any Releasing Party might have because of anything done, omitted to be done, or allowed to be done by any of the Released parties and in any way connected with the Loan or this Amendment or the other Loan Documents as of the date of execution of this Amendment, WHETHER KNOWN OR UNKNOWN, FORESEEN OR UNFORESEEN, including, without limitation, any settlement negotiations and any damages and the consequences thereof resulting or to result from the events described, referred to or inferred hereinabove ("Released Matters"). Releasing Parties each further agrees never to commence, aid or participate in (except to the extent required by order or legal process issued by a court or governmental agency of competent jurisdiction) any legal action or other proceeding based in whole or in part upon the foregoing. In furtherance of this general release, Releasing Parties each acknowledges and waives the benefits of California Civil Code Section 1542 (and all similar ordinances and statutory, regulatory, or judicially created laws or rules of any other jurisdiction), which provides: A GENERAL RELEASE DOES NOT EXTEND TO CLAIMS WHICH THE CREDITOR DOES NOT KNOW OR SUSPECT TO EXIST IN HIS FAVOR AT THE TIME OF EXECUTING THE RELEASE, WHICH IF KNOWN BY HIM MUST HAVE MATERIALLY AFFECTED HIS SETTLEMENT WITH THE DEBTOR. Releasing Parties each agrees that this waiver and release is an essential and material term of this Amendment and that the agreements in this paragraph are intended to be in full satisfaction of any alleged injuries or damages in connection with the Released Matters. Releasing Parties each represents and warrants that it has not purported to convey, transfer or assign any right, title or interest in any Released Matter to any other person or entity and that the foregoing constitutes a full and complete release of the Released Matters. Releasing Parties each also understands that this release shall apply to all unknown or unanticipated results of the transactions and occurrences described above, as well as those known and anticipated. Releasing Parties each has consulted with legal counsel prior to signing this release, or had an opportunity to obtain such counsel and knowingly chose not to do so, and executes such release voluntarily, with the intention of fully and finally extinguishing all Released Matters. 9. Dispute Resolution. This Amendment hereby incorporates any alternative dispute resolution agreement previously, concurrently or hereafter executed between Borrower and Bank. 10. Effect of Amendment. Bank and Borrower agree that except as expressly provided herein, the Agreement and the other Loan Documents shall remain in full force and effect in accordance with their respective terms, without waiver or modification. Borrower acknowledges that it is relying on no written or oral agreement, representation, warranty, or understanding of any kind made by Bank or any employee or agent of Bank except for the agreements of Bank set forth herein or in the Agreement or other Loan Documents. This Amendment is not a novation, nor is it to be construed as a release or modification of any of the terms, conditions, covenants, waivers and releases contained in the Agreement and the Loan Documents, except as expressly amended herein. This Amendment and the Agreement shall be read together as one document. 25 IN WITNESS WHEREOF, Bank and Borrower have executed this Amendment as of the date set forth in the preamble. "BORROWER" "BANK" EMCON, a UNION BANK OF CALIFORNIA, N.A. California corporation By: /s/ R. Michael Momboisse By: /s/ David Jackson ------------------------ --------------------- Title: CFO and VP - Legal Title: Vice President --------------------- ----------------- By: /s/ Eugene M. Herson ------------------------- Title: CEO and President --------------------- 26