Fix a bug of animation clearing.