Transpose connectivity if necessary