Fix accessing edges' vertex IDs