Fix building connectivity graph