fix an animation glitch