Fix small bug with bad array subscripts