AMENDMENT NO. 2 AMENDED AND RESTATED MASTER INVESTMENT ADVISORY AGREEMENT