fixed a bug with animation

fixed a bug with animation