fix dupe handling