Fixes to tokenizer