Fix macros state machine handling.