Fix animation changing bug