         gate = partial_gate();
         break;
       case GATE_LONG:
-        if(cached_step == seq_values.stage_steps[cached_stage] - 1)
+        if(cached_step == widget_save_->params.vals.stage_steps[cached_stage] - 1)
         {
           gate = partial_gate();
         }

    {
      widget_save_->params.vals.gate_time = 8;
    }
    seq_values.gate_ms = widget_save_->params.vals.gate_time * (uint16_t)(Clock.get_period() / 8000);

    // draw global elements
    for(uint8_t i = 0; i < 6; ++i)

  uint8_t last_stage;
  bool last_diradd_mode;
  bool last_reverse;
  uint16_t gate_ms;
};

DU_SEQ_Function * function;
