Fixed issues with animation