Removed permutation bug