Which is how Stephen King ends almost every book. He writes characters better than almost everyone I know but almost every one of his books ends with some weird coincidence that saves the day.
and it's why I wasn't a fan of Toy Story 3. They get saved at the climax by coincidence