Run cancelAnimationFrame before final frame