Fix some bugs about animation