fix - exit condition for tokenization