fixing wrong commit on this file.
adjusting to get name attribute from host tag instead to get from hostname directly.