Solved an issue in the threadpool