Fix problem with hostname processing