fixed bug where 'tokenize' throws error