update core thread and fix errors in work_thread