fixed the EOL bug in tokenize