fixed issue with short hostnames such as localhost