fix crash at exit / clean exit worker threads