fixed game over detection