Fixed animation glitch