fixed a bug that prevented the deletion of previous hosts
trying to deal with too many open file descriptors. Not done yet.