Fixed a race condition which made the thread pool size unnecessarily large.