Fixed bug in animation auto detection