Thread pool fix