fixed FPS bug