Fix the animation bug