Fix broken search after using thread pools.