bugfix in tokenize