threadpool fixes