Fixed some framerate issues