added isNaN check to pause method