diff --git a/src/TNL/Matrices/CSR.h b/src/TNL/Matrices/CSR.h
index 70eae6f4b30eba6e6acdf8772df712c5a9e0bf38..64e202a67716a9710d65505c6c81d7e6069ce9a9 100644
--- a/src/TNL/Matrices/CSR.h
+++ b/src/TNL/Matrices/CSR.h
@@ -47,18 +47,13 @@ public:
    using RealType = Real;
    using DeviceType = Device;
    using IndexType = Index;
-   typedef typename Sparse< RealType, DeviceType, IndexType >:: CompressedRowLengthsVector CompressedRowLengthsVector;
+   typedef typename Sparse< RealType, DeviceType, IndexType >::CompressedRowLengthsVector CompressedRowLengthsVector;
    typedef typename Sparse< RealType, DeviceType, IndexType >::ConstCompressedRowLengthsVectorView ConstCompressedRowLengthsVectorView;
    typedef CSR< Real, Devices::Host, Index > HostType;
    typedef CSR< Real, Devices::Cuda, Index > CudaType;
    typedef Sparse< Real, Device, Index > BaseType;
-   //typedef typename BaseType::MatrixRow MatrixRow;
-   
    using MatrixRow = typename BaseType::MatrixRow;
    using ConstMatrixRow = typename BaseType::ConstMatrixRow;
-   //using typename BaseType::ConstMatrixRow;
-   //typedef SparseRow< const RealType, const IndexType > ConstMatrixRow;
-
 
    enum SPMVCudaKernel { scalar, vector, hybrid };
 
diff --git a/src/TNL/Matrices/Matrix.h b/src/TNL/Matrices/Matrix.h
index e8677b8532518dda1744070b7f7bf29c0c01f1cb..eb29f62c7669af6c32a92414900891accae736f2 100644
--- a/src/TNL/Matrices/Matrix.h
+++ b/src/TNL/Matrices/Matrix.h
@@ -32,7 +32,7 @@ public:
    typedef Index IndexType;
    typedef Containers::Vector< IndexType, DeviceType, IndexType > CompressedRowLengthsVector;
    typedef Containers::VectorView< IndexType, DeviceType, IndexType > CompressedRowLengthsVectorView;
-   typedef Containers::VectorView< const IndexType, DeviceType, IndexType > ConstCompressedRowLengthsVectorView;
+   typedef typename CompressedRowLengthsVectorView::ConstViewType ConstCompressedRowLengthsVectorView;
    typedef Containers::Vector< RealType, DeviceType, IndexType > ValuesVector;
 
    Matrix();