fix bug when edges equal zero