Be a bit more defensive when updating hosts