fixed an animation glitch