fixed setupConnection.