permutations fix