corrected sorting o channels