fixed the terminateAll method for the worker submodule