The US was on track to run out of money in September if there was no deal