request animation frame fix