SECOND Amendment to Master Repurchase and securities contract Agreement and amendment no. 3 to guaranty