Fix primary channel detection in mediator