fixed iterator bug skipping first edge