Fixed improper stripping of hostname when creating a cluster