Fixed a bug with animations.