fixed bug where clients would register with the server host rather than their own