Bugfix: calculation of cleared_frames