Ec2: Adjusts state machine