The threadpool has to die before the index it seems.