Don't rely on totalFrames.