Document:

QuickLinks
 -- Click here to rapidly navigate through this document
  

 
 

EXHIBIT 10.4    
    

 
  SECOND AMENDMENT TO CREDIT AGREEMENT    
    

        THIS SECOND AMENDMENT TO CREDIT AGREEMENT (this "Amendment") dated as of the 20th day of April 2004, by and among PLAINS MARKETING, L.P. ("Borrower"),
FLEET NATIONAL BANK, as Administrative Agent, and the Lenders party hereto. 

W I T N E S S E T H:  

        WHEREAS, Borrower, Administrative Agent and Lenders named therein entered into that certain Credit Agreement dated as of November 21, 2003, as amended by
that certain First Amendment to Credit Agreement dated as of December 19, 2003 (as heretofore amended, the "Original Agreement") for the purposes and consideration therein expressed; and 

        WHEREAS,
Borrower, Administrative Agent and Lenders desire to amend the Original Agreement for the purposes described herein; 

        NOW,
THEREFORE, in consideration of the premises and the mutual covenants and agreements contained herein and in the Original Agreement, and for other good and valuable consideration,
the receipt and sufficiency of which are hereby acknowledged, the parties hereto do hereby agree as follows: 

ARTICLE
I.—Definitions and References

        §
1.1. Terms Defined in the Original Agreement. Unless the context otherwise requires or unless otherwise
expressly defined herein, the terms defined in the Original Agreement shall have the same meanings whenever used in this Amendment. 

        §
1.2. Other Defined Terms. Unless the context otherwise requires, the following terms when used in this
Amendment shall have the meanings assigned to them in this § 1.2. 

        "Amendment" means this Second Amendment to Credit Agreement. 

        "Credit Agreement" means the Original Agreement as amended hereby. 

ARTICLE
II.—Amendments

        §
2.1. Special Financing Requests. Section 2.1 of the Original Agreement is hereby amended by adding a new
subsection (f) at the end thereof, to read as follows: 

        (f)    Special Financing Requests. During the Request Period, Borrower may from time to time submit to Lenders special financing
requests (a "Special Financing Request") substantially in the form of a Financing Request-Initial and otherwise acceptable to Lenders, except that such Special Financing Request shall
(i) specify volumes of Petroleum Products that would otherwise qualify as Hedged Eligible Inventory, except that such Petroleum Products have been previously purchased or are scheduled for
purchase prior to the following month, and (ii) request Lenders to make pro rata advances on such date following delivery of such Petroleum Products as Borrower may specify with a repayment
date as specified in such Special Financing Request, but in no event more than six months after the specified funding date, to fund the purchase of such Petroleum Products. For purposes of the
foregoing: (A) the Hedged Value and Sale Value of such Petroleum Products shall be calculated as though such Petroleum Products qualify as Hedged Eligible Inventory and such Special Financing
Request constitutes a Financing Request-Initial, and (B) such Petroleum Products shall be deemed to be "Financed Hedged Eligible Inventory" hereunder. Any such Special Financing Request may be
evaluated by Lenders and shall be processed as set forth in Section 2.1(b) as though such Special Financing Request constituted a Financing Request-Initial. With respect to any such Special
Financing Request, if one or more Participating Lenders shall in 

1

 

their
sole and absolute discretion commit to finance such purchase of such Petroleum Products, on the specified funding date each Participating Lender shall, subject to the netting provisions set
forth in Section 2.1(d), make its Loan pursuant to Section 2.2, as though such Special Financing Request constitutes a Financing Request-Final;  provided, notwithstanding Section 2.8(c)
hereof, such Loans shall constitute Term Loans due and payable on the repayment date specified in such
Special Financing Request. Borrower hereby agrees that in the event any Loan made pursuant to a Special Financing Request shall not be repaid on the next following Settlement Date, Borrower shall
furnish to Lenders a monthly updated Special Financing Request with respect to such original Special Financing Request, updating the information described therein. The Collateral specified in any such
Special Financing Request (and any related updated Special Financing Request) shall primarily secure such Loans made with respect to such Collateral, and secondarily secure all other Obligations. 

        §
2.2. Link Asset Financings. Borrower desires to submit to Lenders monthly financing requests of up to
$60,000,000 per month with respect to in transit Hedged Eligible Inventory relating to Borrower's recent acquisition of certain assets of Link Energy LLC, to be delivered to Borrower commencing
May 2004 through and including August 2004, (a "Link Asset Financing Request") substantially in the form of a Financing Request-Initial, except that such Link Asset Financing Request
shall not include a schedule specifying the Approved Locations through which such Hedged Eligible Inventory will be in transit, but shall include a schedule listing sales contracts constituting
Eligible Receivables with an aggregate face amount not less than $67,000,000 and shall provide for the granting of a lien on and security interest therein. Any such Link Asset Financing Request shall
be evaluated by Lenders and shall be processed as set forth in Section 2.1(b), (c) and (d) as though such Link Asset Financing Request constitutes a Financing Request-Initial. The
Collateral specified in any such Link Asset Financing Request shall primarily secure such Letters of Credit issued with respect thereto and Borrower's reimbursement obligations with respect thereto,
as well as Loans made with respect to such Collateral, and secondarily secure all other Obligations. 

ARTICLE
III.—Conditions of Effectiveness

        §
3.1. Effective Date. This Amendment shall become effective as of the date first written above, when and only
when 

        (i)    Administrative
Agent shall have received, at Administrative Agent's office a counterpart of this Amendment executed and delivered by Borrower and Lenders; 

        (ii)   Administrative
Agent shall have additionally received all of the following documents, each document (unless otherwise indicated) being dated the date of receipt thereof
by Administrative Agent, duly authorized, executed and delivered, and in form and substance satisfactory to Administrative Agent: 

        Supporting Documents. Such supporting documents as Administrative Agent may reasonably request. 

ARTICLE
IV.—Representations and Warranties

        §
4.1. Representations and Warranties of Borrower. In order to induce Administrative Agent and Lenders to enter
into this Amendment, Borrower represents and warrants to Administrative Agent and each Lender that: 

        (a)   The
representations and warranties contained in Article V of the Original Agreement are true and correct at and as of the time of the effectiveness hereof, except
to the extent that such representation and warranty was made as of a specific date. 

        (b)   Borrower
is duly authorized to execute and deliver this Amendment, to the extent a party thereto, and Borrower is and will continue to be duly authorized to borrow and
perform its 

2

 

obligations
under the Credit Agreement. Borrower has duly taken all action necessary to authorize the execution and delivery of this Amendment and to authorize the performance of its obligations
hereunder. 

        (c)   The
execution and delivery by Borrower of this Amendment, the performance by it of its obligations hereunder, and the consummation of the transactions contemplated
hereby, do not and will not conflict with any provision of any Law or of the organizational documents of Borrower, or of any material
agreement, judgment, license, order or permit applicable to or binding upon Borrower, or result in the creation of any Lien upon any assets or properties of Borrower, except in favor of Administrative
Agent and other Permitted Liens. Except for those which have been duly obtained, no consent, approval, authorization or order of any Tribunal or third party is required in connection with the
execution and delivery by Borrower of this Amendment or to consummate the transactions contemplated hereby. 

        (d)   When
duly executed and delivered, this Amendment and each of the Loan Documents, as amended hereby, will be a legal and binding instrument and agreement of Borrower,
enforceable in accordance with its terms, (subject, as to enforcement of remedies, to applicable bankruptcy, insolvency and similar laws applicable to creditors' rights generally). 

ARTICLE
V.—Miscellaneous

        §
5.1. Ratification of Agreements. The Original Agreement, as hereby amended, is hereby ratified and confirmed in
all respects. The Loan Documents, as they may be amended or affected by this Amendment, are hereby ratified and confirmed in all respects by Borrower. Any reference to the Credit Agreement in any Loan
Document shall be deemed to refer to this Amendment also. 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 Administrative Agent or any Lender under the Credit Agreement or any other Loan Document nor constitute a waiver of any provision of the Credit Agreement or any other Loan Document. 

        §
5.2. Ratification of Security Documents. Borrower, Administrative Agent, and Lenders each acknowledge and agree
that any and all indebtedness, liabilities or obligations, arising under or in connection with the LC Obligations or the Notes, are Obligations and are secured indebtedness under, are guarantied by,
and are secured by, each and every Security Document. Borrower hereby re-pledges, re-grants and re-assigns a security interest in and lien on every asset of
Borrower described as Collateral in any Security Document. 

        §
5.3. Survival of Agreements. All representations, warranties, covenants and agreements of Borrower shall
survive the execution and delivery of this Amendment and the performance hereof, including without limitation the making or granting of each Loan, and shall further survive until all of the
Obligations under the Credit Agreement are paid in full. All statements and agreements contained in any certificate or instrument delivered by Borrower hereunder or under the Credit Agreement to
Administrative Agent or any Lender shall be deemed to constitute representations and warranties by, or agreements and covenants of, Borrower under this Amendment and under the Credit Agreement. 

        §
5.4. Loan Documents. This Amendment is a Loan Document, and all provisions in the Credit Agreement pertaining
to Loan Documents apply hereto. 

        § 5.5. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK
AND ANY APPLICABLE LAWS OF THE UNITED STATES OF AMERICA IN ALL RESPECTS, INCLUDING CONSTRUCTION, VALIDITY AND PERFORMANCE.

        §
5.6. Counterparts. This Amendment may be separately executed in counterparts and by the different parties hereto in separate
counterparts, each of which when so executed shall be deemed to constitute one and the same Amendment. Delivery of an executed signature page by facsimile transmission shall be effective as delivery
of a manual executed counterpart. 

3

 

        IN
WITNESS WHEREOF, this Amendment is executed as of the date first above written. 

	BORROWER:	 	PLAINS MARKETING, L.P.
	

 	
 	

By: Plains Marketing GP Inc., General Partner
	

 	
 	

By:	

/s/  AL SWANSON      
 Al Swanson, Vice President and Treasurer
	
LENDER PARTIES:	
 	

FLEET NATIONAL BANK,

Administrative Agent, LC Issuer and Lender
	

 	
 	

By:	

/s/  TERRENCE RONAN      
 Terrence Ronan, Managing Director
	

 	
 	

BNP PARIBAS, Lender
	

 	
 	

By:	

/s/  JORDAN N      
 Name: Jordan N

Title: Vice President
	

 	
 	

By:	

/s/  A-C MATHIOT      
 Name: A-C Mathiot

Title: Managing Director
	

 	
 	

FORTIS CAPITAL CORP., Lender
	

 	
 	

By:	

/s/  CHAD CLARK      
 Name: Chad Clark

Title: Vice President
	

 	
 	

By:	

/s/  LEONARD RUSSO      
 Name: Leonard Russo

Title: Director
	

 	
 	

SOCIETE GENERALE, Lender
	

 	
 	

By:	

/s/  EMMANUEL CHESNEAU      
 Name: Emmanuel Chesneau

Title: Director
	

 	
 	

By:	

/s/  BARBARA PAULSEN      
 Name: Barbara Paulsen

Title: Director

4

QuickLinks

EXHIBIT 10.4

SECOND AMENDMENT TO CREDIT AGREEMENTQuickLinks
 -- Click here to rapidly navigate through this document
  

EXHIBIT 10.1  

  
 

    THIRD AMENDMENT TO LEASE AGREEMENT    
    

        THIS THIRD AMENDMENT TO LEASE AGREEMENT (this "Third Amendment") is made as of April 12, 2004 by and between BAY MEADOWS MAIN
TRACK INVESTORS, LLC, a Delaware limited liability company ("Landlord"), as the successor-in-interest to Bay Meadows Land
Company, LLC, a Delaware limited liability company, f/k/a PW Acquisitions IV, LLC ("BMLC") and BAY MEADOWS OPERATING COMPANY LLC, a Delaware limited liability company
("Tenant"). 

 
 

RECITALS    
    

        A.    BMLC and Tenant entered into that certain Lease dated as of November 17, 2000 (the "Lease"), for that certain
parcel of real property (the "Land") together with the horse racing facility and associated improvements (the "Main Track Improvements"), located in San Mateo County, California (as more particularly
described and defined in the Lease, collectively, the "Premises"). 

        B.    BMLC
and Tenant entered into that certain Amendment to Lease Agreement dated as of December    , 2002 (the "First Amendment"), whereby certain terms and
provisions of the Lease were amended or restated as more particularly set forth therein. 

        C.    Landlord
and Tenant entered into that certain Second Amendment to Lease Agreement dated as of December 31, 2003 (the "Second Amendment") whereby certain terms and
provisions of the Lease were amended or restated as more particularly set forth therein. 

        D.    Landlord
and Tenant desire further to amend the Lease on the terms provided in this Third Amendment. All initially capitalized terms used but not otherwise defined in
this Amendment shall have the meanings assigned to such terms in the Lease. 

        NOW,
THEREFORE, in consideration of the covenants set forth herein, Landlord and Tenant agree to amend the terms and provisions of the Lease, as amended by the First Amendment and the
Second Amendment, as follows: 

 
 

AGREEMENT    
    

        1.    Insurance.    Section 12(a) of the Lease is hereby deleted in its entirely and the following
substituted in its place: 

        (a)    Improvements.    Throughout
the term of the Lease, Landlord shall, at Landlord's sole cost and expense, maintain in effect
property insurance on the Main Track Improvements in such amounts and coverages as any institutional lender having a lien on the Premises shall require or as Landlord shall otherwise reasonably
determine shall be necessary or desirable. Tenant acknowledges that such insurance may include coverage insuring Landlord's interest in the FF&E as specified in the Second Amendment, but that such
coverage shall not preclude Tenant from also carrying such insurance as Tenant shall deem necessary or appropriate with respect to Tenant's interest in the FF&E. 

1

 

        2.    Damage
and Destruction    Section 14(a) of the Lease is hereby deleted in its entirety and the following substituted in its
place: 

        (a)    Option
to Terminate.    If the Main Track Improvements, or any portion thereof, are damaged or destroyed to the extent that racing
operations are not feasible during the remainder of the Term, then either Landlord or Tenant shall have the right to terminate this Lease effective upon the date of such damage or destruction by
giving notice to the other within thirty (30) days of the date of such damage or destruction. All proceeds of any insurance carried by Landlord with respect to the Main Track Improvements or
the FF&E for the benefit of Landlord shall belong to and shall be payable solely to Landlord; provided, however, that in the event that either Landlord or Tenant so elects to terminate the Lease on
account of any such damage or destruction to the Main Track Improvements, Tenant shall be entitled to receive from Landlord (i) an amount equal to the pro rata portion of the rent paid
to Landlord for the period from the effective date of the termination to the Expiration Date of this Lease and (ii) an amount equal to the pro rata portion of the property taxes paid by
Tenant with respect to the Premises for the period from the effective date of the termination to the Expiration Date of this Lease; and provided, further, that all other terms and provisions of the
Lease applicable upon the Expiration Date, including the provisions of Paragraphs 3, 4, 5 and 7 of the Second Amendment, shall survive such termination as though the Lease had terminated upon
the Expiration Date in accordance with its terms. 

        3.    Indemnification.    Landlord
acknowledges that the indemnification obligation of Tenant under Paragraph 11 of the Lease is
intended to apply only to matters that occur during the period of Tenant's occupancy of the Premises. 

        4.    General
and Miscellaneous. 

        (a)    Representations and Warranties.    Tenant represents to Landlord that (i) the person or persons
signatory to this Amendment have full power and authority to bind Tenant, and (ii) the execution and delivery of this Amendment and the performance of Tenant's obligations hereunder do not and
shall not result in the violation of Tenant's organizational documents or any material contract or agreement to which tenant is a party. Landlord represents to Tenant that (i) the person or
persons signatory to this Amendment have full power and authority to bind Landlord, and (ii) the execution and delivery of this Amendment and the performance of Landlord's obligations hereunder
do not and shall not result in the violation of Landlord's organizational documents or any material contract or agreement to which Landlord is a party. 

        (b)    Ratification.    Except as modified herein and by the First Amendment and the Second Amendment, the Lease
remains unchanged and is in full force and effect. 

2

 

        (c)    Counterparts.    This Amendment may be executed in counterparts, each of which shall constitute an original,
but all together shall be deemed to be one agreement. 

        (d)    Severability.    Any provision of this Amendment which a court of competent jurisdiction shall determine to be
invalid, void or illegal shall in no way affect, impair or invalidate any other provision hereof and all such other provisions shall remain in full force and effect. 

        (e)    Applicable Law.    This Amendment shall be governed by and construed in accordance with the laws of the State
of California. 

        (f)    No Recordation.    Neither this Amendment, nor a short form thereof, shall be recorded. 

        (g)    Reaffirmation.    Except as specifically amended hereby or in the First Amendment or the Second Amendment, the
Lease is and shall remain in full force and effect; and to the extent that there are any inconsistencies between the provisions of this Amendment and the Lease (as modified by the First Amendment and
the Second Amendment), the provisions hereof shall control. 

        [Remainder of Page Intentionally Blank; Signature Page Follows] 

3

 

        IN
WITNESS WHEREOF, this Amendment is effective as of the date first written above. 

	 LANDLORD:	 	TENANT:
	
 BAY MEADOWS MAIN TRACK

INVESTORS, LLC, a Delaware limited

liability company	
 	

BAY MEADOWS OPERATING

COMPANY LLC, a Delaware limited

liability company
	By:	/signed/Kristin Gardner	 	By:	Magna Entertainment Corp., a

Delaware corporation
	 	
	 	 	

	Name:	Kristin Gardner	 	By:	/signed/Gary M. Cohn
	 	
	 	 	

	Title:	Vice-President	 	Name:	Gary M. Cohn
	 	
	 	 	

	 	 	 	Title:	V.P. and Secretary
	 	 	 	 	

4

QuickLinks

THIRD AMENDMENT TO LEASE AGREEMENT

RECITALS

AGREEMENT

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00070-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00070-of-00352.parquet"}]]