bug fix in stateMachine (mispelled field name)