fixed requestAnimtationFrame, call in window context