diff --git a/src/libnptm/lapack_calls.cpp b/src/libnptm/lapack_calls.cpp
index b4cb88d7ac222745fa9df17ecf33ff3e4d8c4294..0b43c046fa3e56bc483934c736cdd6d5beb5cd2f 100644
--- a/src/libnptm/lapack_calls.cpp
+++ b/src/libnptm/lapack_calls.cpp
@@ -17,7 +17,7 @@ void zinvert(std::complex<double> **mat, lapack_int n, int &jer) {
     }
   }
   
-  int* IPIV = new int[n]();
+  lapack_int* IPIV = new lapack_int[n]();
   
   LAPACKE_zgetrf(LAPACK_ROW_MAJOR, n, n, arr, n, IPIV);
   LAPACKE_zgetri(LAPACK_ROW_MAJOR, n, arr, n, IPIV);