Fix overflow in channels