fixes for is_connected.