bug in stateMachine gefixt.