Bugfix for worker cancellation.