Added nullcheck to pause