requestAnimationFrame fix