Bug fix while stopping an animation.