Changed calculation of frames