fix pause/resume