fixed connecting to server