#136; improve pause/resume logic