helper: do not do nextPosition if target != n
fix issue with symbols being attached to the previous char