Updated state machine.