stop errors and add request animation frame
work