fixed bug with restarting on animations