Making matrix work only in row_major