fix for invalid iterator when host remove - merged from dev