EXHIBIT 10.31 Amendment to Nonstatutory Stock Option Agreement dated July 31, 1996 between the Company and Douglas H. Miller amending the Nonstatutory Stock Option Agreement filed as Exhibit 10.24 above. AMENDMENT TO NONSTATUTORY STOCK OPTION AGREEMENT THIS AMENDMENT TO NONSTATUTORY STOCK OPTION AGREEMENT is made as of the 31st day of July, 1996, between Coda Energy, Inc., a Delaware corporation (the "Company") and Douglas H. Miller ("Employee"). WHEREAS, the Company, Employee and Coda Acquisition, Inc. have entered into that certain Nonstatutory Stock Option Agreement dated February 16, 1996 (the "Option Agreement") covering the right and option to purchase shares of common stock of the Company, par value $.01 per share (the "Stock"); WHEREAS, the Company is the successor by merger to Coda Acquisition, Inc.; and, WHEREAS, the Company and Employee desire to amend the Option Agreement. NOW, THEREFORE, in consideration of the premises and for other good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, it is agreed that Section 3 of the Option Agreement is hereby amended by adding the following additional paragraph thereto: "Notwithstanding anything to the contrary contained herein: (i) this Option shall not be exercisable as to any shares of Stock unless and until all principal and accrued interest (whether or not then due and payable), together with any other sums due and payable, under that certain Limited Recourse Promissory Note dated July 31, 1996, drawn in the amount of $1,187,500 and payable by Employee to Company, as modified, extended or renewed, (the "Note") are paid in full; and, (ii) in the event of a default under the Note, the Company shall have the unilateral right to cancel this Option, but only as to that number of shares of Stock, rounded to the nearest whole share, having an aggregate fair market value (determined by the Company in accordance with Section 4.4(c)(ii) of the Stockholders Agreement (as defined herein)) equal to the unpaid principal balance plus accrued interest under the Note, and the Company shall furnish prompt written notice of such cancellation to Employee." IN WITNESS WHEREOF, the Company and Employee have executed this instrument as of the day and year first above written. CODA ENERGY, INC. By: /s/ Grant Henderson -------------------- Grant W. Henderson President and CFO \s\ Douglas H. Miller ----------------------- Douglas H. Miller