fix a bug, need threadpool