Fix connection to the server