Selecting uniform number of trials before Time-frequency

I should mention that this same procedure using time-domain averaging instead of the time-frequency transform works EXACTLY as expected, selecting the maximum uniform number of trials between the two conditions and creating an average for each.