Fixed placement of else to fix channels being set incorrectly.