fix next(RepString, i) bug
update fix next(RepString, i)