THIRTEENTH AMENDMENT TO NOTE AND WARRANT PURCHASE AGREEMENT AND LIMITED CONSENT*