Updated to match the state machine.