Fixed a bug where empty channels could crash updateChannels()