correct bug on connection automata