fixing getAllHosts