fixing inconsistencies with hostname and port specifications