thread pool fixes