THIRTEENTH AMENDMENT TO SENIOR FIRST PRIORITY SECURED PROMISSORY NOTE