Fix tokenize method in Tokenizer for strings