Fix undefined channel index