fix bug of ThreadPool