dct: fix permutations