Fixed a bug in the animation update.