fixed error in host identifier where returned value would have a '.'
appended in special cases
changed a lot of things