Fix bugs in channel creation