Fixed to work with unlimited channels (not just 32 or 16)