Fix framerate calculation.