Automaton work, but error with drawline