Fixed bug relating to animations