Fixed issue with animation looping.