Fix bug when compensate > repeats.