improve autoPause functionality