Deal Reached to Avert Government Shutdown