check zero-length edges