fixed a bug in the animation system