submatrix foreach bug fix, zero-base now deprecated