fixed Automata bug
merge fixed