fix game over detection