fix error in workerthread