Fixed animation not looping if the frame exceeded frame max.