Fixed issue with 'p' tag not resetting automaton state