fix isAnimating bugs