Fixed a bug where a dash ('-') in a host name was not allowed