EXHIBIT 10.19 SECOND AMENDMENT TO STOCK AND ASSET PURCHASE AGREEMENT SECOND AMENDMENT TO STOCK AND ASSET PURCHASE AGREEMENT (this "Amendment") dated August 15, 1995, among CASTLE ENERGY CORPORATION, a Delaware corporation; INDIAN REFINING & MARKETING I INC., an Illinois corporation (f/k/a Indian Refining & Marketing Inc.), INDIAN REFINING I LIMITED PARTNERSHIP, an Illinois limited partnership (f/k/a Indian Refining Limited Partnership), IP OIL CO., an Illinois corporation, INDIAN POWERINE L.P., an Illinois limited partnership, and INDIAN OIL COMPANY, an Illinois corporation; and CORE REFINING CORPORATION, A Delaware corporation. The parties hereto are parties to a Stock and Asset Purchase Agreement dated May 25, 1995 (the "Purchase Agreement"), as amended by an Amendment to Stock and Asset Purchase Agreement dated July 31, 1995. Capitalized terms not otherwise defined herein have the meaning ascribed to them in the Purchase Agreement. NOW, THEREFORE, for good and valuable consideration, receipt of which is hereby acknowledged, the parties hereto agree as follows: 1. Section 1.1 of the Purchase Agreement is hereby amended, effective as of the date first set forth above, by (i) deleting the defined term "Termination Date" in its entirety and (ii) substituting therefor the following: "Termination Date" shall mean August 31, 1995; provided, that if, on or before August 31, 1995, CORE shall give notice to Castle that the Issuer has commenced marketing the first mortgage notes that comprise a portion of the Debt Financing and that CORE reasonably believes it can obtain the Financing and consummate the Closing on or before September 10, 1995, the Termination Date shall be extended to September 10, 1995. IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed as of the day and year first written above. CORE REFINING CORPORATION By: /s/William S. Sudhaus ---------------------------------------------- William S. Sudhaus CASTLE ENERGY CORPORATION By: /s/Joseph L. Castle II ---------------------------------------------- Joseph L. Castle II Chief Executive Officer INDIAN REFINING & MARKETING I INC. By: /s/David M. Hermes ---------------------------------------------- David M. Hermes, Senior Vice President-Raw Material Supply INDIAN REFINING I LIMITED PARTNERSHIP By: Indian Refining & Marketing I Inc. By: /s/David M. Hermes ---------------------------------------------- David M. Hermes, Senior Vice President-Raw Material Supply IP OIL CO. By: /s/David M. Hermes ---------------------------------------------- David M. Hermes, Senior Vice President-Raw Material Supply INDIAN POWERINE L.P. By: IP OIL CO. By: /s/David M. Hermes ---------------------------------------------- David M. Hermes, Senior Vice President-Raw Material Supply INDIAN OIL COMPANY By: /s/David M. Hermes ---------------------------------------------- David M. Hermes, Senior Vice President-Raw Material Supply -2-