Fix tokenization issue by making the algorithm more greedy.