fixed pausing when resuming