Improvement on path toke sequence calculation.