More layout fix on state machine