AMENDMENT NO. 2 NOTE PURCHASE AGREEMENT