Well, they've got five more episodes to tie things up.
I hope they knew that it was likely to be the end when they were making them.
Still, whatever happens, it can't be worse than the ending of Terminator: The Sarah Connor Chronicles (which I thought was an absolutely brilliant show while it lasted, surprisingly). They ended the second season with an absolutely massive 'how the hell are they going to get out of that???!!!' cliffhanger, then the show got cancelled. Great.