Fix a segfault occuring due to double free in the Worker destructor.