Fixed Rookie Error with permutations Function.