More robust way of getting `nFrames`