fix the bug of animation.