More fixes to test_connection