#295 Fix getCityDegree algorithm