fixed a really stupid mistake in the class ThreadPool