Exhibit 10.5 Amendment to Crude Oil Sale and Supply Agreement This Amendment to the Crude Oil Sale and Supply Agreement entered into as of September 13, 2002, by and between Morgan Stanley Capital Group Inc. ("MSCG") and The Premcor Refining Group Inc. ("Premcor") (the "Agreement"), is made and entered into on October 1, 2002 (hereinafter referred to as this "First Amendment"). Capitalized terms and references used and not defined herein shall have the respective meanings ascribed to them in the Agreement, which is being amended by this First Amendment. WHEREAS, the MSCG and Premcor desire to amend the Agreement as set forth herein. NOW, THEREFORE, in consideration of the premises and the respective promises, conditions and agreements contained herein, and other good and valuable consideration, the receipt and adequacy of which are hereby acknowledged, MSCG and Premcor do hereby agree as follows: ARTICLE 1 DEFINITIONS AND CONSTRUCTION 1.1 All headings herein are intended solely for convenience of reference and shall not affect the meaning or interpretation of the provisions of this Amendment. 1.2 Unless expressly provided otherwise, the word "including" as used herein does not limit the preceding words or terms. 1.3 Each reference in the Crude Oil Sale and Supply Agreement to "this Agreement", "herein" or words of like import referring to such Agreement shall mean and be a reference to the Crude Oil Sale and Supply Agreement, as amended by this First Amendment. ARTICLE 2 AMENDMENT TO AGREEMENT The Agreement is hereby amended, effective as of September 16, 2002, as follows: 2.1 A new Section 4.8 is added as follows: 4.8 Initial Imbalances. The Parties hereby acknowledge and agree that the MSCG shall purchase from Koch exactly 2,659,386 Barrels of Line Fill Oil on October 1, 2002, of which 196,122 Barrels shall transfer from Koch to MSCG in line in the Mesa Pipeline System, 1,540,925 Barrels shall transfer from Koch to MSCG in line in the Mid-Valley Pipeline System, and 922,339 Barrels shall transfer from Koch to MSCG in line in the West Texas Gulf Pipeline System. In the event that a Shipper Account Statement reflects that the volume of Line Fill Oil actually transferred to MSCG on October 1, 2002 and held on the Pipeline System's records in MSCG's name as of that date differs from the foregoing volumes of Line Fill Oil, MSCG and Premcor shall true-up the difference. If the total volume of Line Fill Oil actually transferred from Koch to MSCG exceeds 2,659,386 Barrels, MSCG shall pay Premcor for the difference in volume, and if the total volume of Line Fill Oil actually transferred from Koch to MSCG is less than 2,659,386 Barrels, Premcor shall pay MSCG for the difference in volume, in either event at a price mutually determined between the Parties in a commercially reasonable manner and in accordance with the terms of the Agreement. 2.2 A new Section 7.5 is added as follows: 7.5 Renewal of Premcor Letter of Credit. At all times under this Agreement, the Premcor Letter of Credit shall have an expiration date of not less than 15 days. No later than 15 days prior to expiry of the Premcor Letter of Credit, Premcor shall instruct the issuing bank to renew or extend such Letter of Credit. Premcor's failure to amend and extend the Premcor Letter of Credit no later than 15 days prior to the expiration thereof (such an event, a "Non-Renewal Event") shall (x) entitle MSCG to treat the full amount available for drawing under the Premcor Letter of Credit as the outstanding amount due MSCG and to draw immediately on such Letter of Credit in full without any prior notice or demand to Premcor and (y) constitute an Event of Default under Article 11 without any notice or grace period. Notwithstanding the foregoing and Section 2.1(c) of this Agreement: (a) in the event that MSCG makes a draw on the Premcor Letter of Credit as a result of a Non-Renewal Event and elects in such event, in its sole discretion, to hold the proceeds of such draw as cash collateral for Premcor's obligations under this Agreement and not exercise its remedies under Article 11, then (i) the Non-Renewal Event shall not be an Event of Default and (ii) Premcor shall not be obligated to increase the amount available to be drawn under the Premcor Letter of Credit to the extent of such cash collateral; and (b) in the event that MSCG makes a draw on the Premcor Letter of Credit other than as a result of an Event of Default or a Non-Renewal Event, then (i) MSCG shall hold the proceeds of such draw as cash collateral for Premcor's obligations under this Agreement, (ii) such draw shall not itself be deemed to be an Event of Default and (iii) Premcor shall not be obligated to increase the amount available to be drawn under the Premcor Letter of Credit to the extent of such cash collateral. ARTICLE 3 MISCELLANEOUS 3.1 The Agreement is amended only as expressly modified by this First Amendment. Except as expressly modified by this First Amendment, the terms of the Agreement remain unchanged, and the Agreement is hereby ratified and confirmed by the Parties in all respects. In the event of any inconsistency between the terms of the Agreement and this First Amendment, this First Amendment shall prevail to the extent of such inconsistency. 2 3.2 Representations and Warranties. Each Party represents and warrant that this First Amendment has been duly authorized, executed and delivered by it and that each of this First Amendment and the Agreement constitutes its legal, valid, binding and enforceable obligation, enforceable against it in accordance with its terms, except to the extent such enforceability may be limited by the effect of any applicable bankruptcy, insolvency, reorganization, moratorium or similar laws affecting creditors' rights generally and by general principles of equity. 3.3 No Waiver. Except as expressly provided herein, the execution and delivery of this First Amendment shall not be deemed or construed to (i) constitute an extension, modification or waiver of any term or condition of the Agreement, (ii) give rise to any obligation on the part of either Party to extend, modify or waive any term or condition of the Agreement or (iii) be a waiver by either Party of any of its rights under the Agreement, at law or in equity. 3.4 Reaffirmation. Each Party hereby reaffirms each and every covenant, condition, obligation and provision set forth in the Agreement, as modified hereby. 3.5 Governing Law. THIS FIRST AMENDMENT AND ANY ISSUES ARISING HEREUNDER SHALL BE GOVERNED BY, CONSTRUED AND ENFORCED UNDER THE LAWS OF THE STATE OF NEW YORK WITHOUT GIVING EFFECT TO ITS CONFLICTS OF LAWS PRINCIPLES. 3.6 Severability. If any Article, Section or provision of this First Amendment shall be determined to be null and void, voidable or invalid by a court of competent jurisdiction, then for such period that the same is void or invalid, it shall be deemed to be deleted from this First Amendment and the remaining portions of this First Amendment shall remain in full force and effect. 3.7 Counterparts. This First Amendment may be executed by the Parties in separate counterparts and initially delivered by electronic or facsimile transmission or otherwise, with original signature pages to follow, and all such counterparts shall together constitute one and the same instrument. [Remainder of Page Intentionally Left Blank] 3 IN WITNESS WHEREOF, each Party hereto has caused this First Amendment to be executed by its duly authorized representative on the date written below. Morgan Stanley Capital Group Inc. By: /s/ John Shapiro -------------------------------- Title: Vice President of Morgan Stanley Capital Group Inc. -------------------------------- Date: September 13, 2002 -------------------------------- The Premcor Refining Group Inc. By: /s/ Donald F. Lucey -------------------------------- Title: Vice President - Commercial -------------------------------- Date: September 13, 2002 --------------------------------