state machine fixes