fix channel unregister & tests