fix up "permute keys"