SECOND AMENDMENT TO CREDIT AGREEMENT & AMENDMENT TO RESIDUAL ROYALTY AGREEMENT