Fixed the frame being skipped when using a custom framerate