Fix references to state-machine