fixed a bug with Automaton.toString