Fixed pauseOnHide bug