Fix overflow when creating a channel