Fixed issue with pausing animation