fix permutation test