Fixed the whole game state machine.