power-of-2 permutation generator fix