Fixed bugs preventing from having a working branch. Sortings of channels has some errors