fix IPV6 formatting
strip trailing . from hostname