handle "host not found" correctly and test