Fixed bugs on animation.