Fix bug on token iteration.