Corrected a bug where gameover wasn't being detected correctly