Application of Proceeds The Collateral Agent shall apply the proceeds of any collection, sale, foreclosure or other realization upon any Collateral, including any Collateral consisting of cash, as follows: FIRST, to the payment of all costs and expenses incurred by the Administrative Agent or the Collateral Agent (in their respective capacities as such hereunder or under any other Loan Document) in connection with such collection, sale, foreclosure or realization or otherwise in connection with this Agreement, any other Loan Document or any of the Obligations, including all court costs and the reasonable fees and expenses of its agents and legal counsel, the repayment of all advances made by the Collateral Agent or the Administrative Agent hereunder or under any other Loan Document on behalf of any Grantor and any other costs or expenses incurred in connection with the exercise of any right or remedy hereunder or under any other Loan Document; SECOND, to the payment in full of Unfunded Advances/Participations (the amounts so applied to be distributed between or among the Administrative Agent, any Swingline Lender and any Issuing Bank pro rata in accordance with the amounts of Unfunded Advances/Participations owed to them on the date of any such distribution); THIRD, to the payment in full of all other Obligations (the amounts so applied to be distributed (subject to the first proviso to Section 3.01 and clause (B) of the first proviso to Section 4.01(a)) among the Secured Parties pro rata in accordance with the amounts of the Obligations owed to them on the date of any such distribution); and FOURTH, to the Grantors, their successors or assigns, or as a court of competent jurisdiction may otherwise direct. The Collateral Agent shall have absolute discretion as to the time of application of any such proceeds, moneys or balances in accordance with this Agreement. Upon any sale of Collateral by the Collateral Agent (including pursuant to a power of sale granted by statute or under a judicial proceeding), the receipt of the Collateral Agent or of the officer making the sale shall be a sufficient discharge to the purchaser or purchasers of the Collateral so sold and such purchaser or purchasers shall not be obligated to see to the application of any part of the purchase money paid over to the Collateral Agent or such officer or be answerable in any way for the misapplication thereof.
Allocation of Proceeds If an Event of Default shall exist and maturity of any of the Obligations has been accelerated, all payments received by the Agent under any of the Loan Documents, in respect of any principal of or interest on the Obligations or any other amounts payable by the Borrower hereunder or thereunder, shall be applied in the following order and priority: