game loop fixed