Update animation and fix some bugs