fixed bug with gameover() check