fix connecting to a local server