fix delete host not closing automatically