Correctly establishing a connection