Fixed render issue in game loop.