Correct pausing/resuming of tasks.