Fixed unit tests due to changes in the threadpool