Correct string state machine