Fixed duplicates in permutations.