Fix: submatrix dimension computation #2