added bugfix for remote clients registering with the incorrect hostname