Added priority sorting for channels.