Trim hostnames. Fixes #79