Fix animation bugs