Thanks for pointing out that problem. It was indeed my mistake leaving a null slot on the array from one of those switches.