which I fixed. It did not check that the array dimension was less than or equal to nchnls. The warning is a little noisy but I will look at quietening it