recursion: fixes in permutations