fix animation generation bug