SECOND MODIFICATION AND EXTENSION AGREEMENT