Fix connection to server