Modify hash to work with automaton