AMENDMENT NO. 2 to Credit Agreement and AMENDMENT NO.1 to Security Agreement