fixed the animation problem