AMENDMENT NO. 2 TO THE CREDIT AGREEMENT AND AMENDMENT TO THE COLLATERAL AGREEMENT