fixed late frame calculation