Fix connection  to server.