fix bug in tokenizer