fix a bug in tokenization