fix dupe detection