THIRD MODIFICATION AND EXTENSION AGREEMENT