Fix tokenizer loop