Fix animation loop