Attempt to fix thread pool race cond