fix connectivity matrix consistency issue