fixes bug where game ends too early