Fixed Recursion Permutation Bug