THIRD AMENDMENT TO LOAN AGREEMENT AND SETTLEMENT AGREEMENT