Moving calls to pm.isCancelled to have more responsive cancellations.