rework the channel delete code