Fixed bug in animation