fix pauseAnimation issue