Animation restart bug fix