WAIVER AND SECOND AMENDMENT TO NOTE PURCHASE AGREEMENT