Can we move this clean up code to the OpenWorker destructor instead?