AMENDMENT NO. 12 TO AMENDED AND RESTATED LOAN AGREEMENT