fix edges count