Use RIBBON_NUM_FIELDS instead of constant values