bugfix: wrong trimming of host name