Fixed hostname parsing problem