Update of state machine.