End game. Infinite loop bug