Fixes bugs on Tokenizer and AbstractAutomata.