Fixes transpositions (TODO other alternatives)