fix a transposition repetition bug