Make sure workers are closed before restart