Fixed port assignement bug in ChatClient