fix bug with animations randomly not working