Corrected issue depending on if matrix is row-major/column-major