Fix errors in server connection.