[Fix] Remove connectionChannelIds outside the loop