fix wonky logic figuring out host name