A little bone-head of a state machine