diff --git a/src/make_matrix.f90 b/src/make_matrix.f90
index 3acb0eeb5f3ae8c0a06c9031e1844a531be39378..7385bf514f91ecf2bd64e0542c9d82ac8f961343 100644
--- a/src/make_matrix.f90
+++ b/src/make_matrix.f90
@@ -21,7 +21,7 @@ subroutine make_matrix (params,ndof,ael,bel,icon,xg,yg,zg,kfix,viscosity0,     &
                         diffusivity,heat,plasticity_type,plasticity_parameters,&
                         unode,vnode,wnode,temp,pressure,strain,is_plastic,     &
                         nnode,ffff,r0,s0,t0,rst,ileaves,eviscosity,vbounded,   &
-                        threadinfo,weight,call_cnt)
+                        threadinfo,weight)
 
 !------------------------------------------------------------------------------|
 !(((((((((((((((( Purpose of the routine  ))))))))))))))))))))))))))))))))))))))
@@ -90,7 +90,6 @@ logical vbounded
 logical is_plastic
 type (thread) threadinfo
 double precision weight
-integer call_cnt
 
 !------------------------------------------------------------------------------|
 !(((((((((((((((( declaration of the subroutine internal variables )))))))))))))
@@ -218,7 +217,7 @@ do iint=1,nint
       ezx=ezx+(dhdz(k)*unode(ic)+dhdx(k)*wnode(ic))/2.d0
    enddo
 
-   call deviatoric (exx,eyy,ezz,exy,eyz,ezx)
+   call deviatoric (params%invariants_2d,exx,eyy,ezz,exy,eyz,ezx)
 
    J2d=second_invariant(exx,eyy,ezz,exy,eyz,ezx)
    J3d=third_invariant (exx,eyy,ezz,exy,eyz,ezx)
@@ -242,7 +241,7 @@ do iint=1,nint
    if (trim(plasticity_type)/='No') &
    call vrm (params,J2d,J3d,compressibility,viscosity,pressure,                &
             plasticity_parameters,plasticity_type,is_plastic_temp,flag_vrm_pb, &
-            straintot,call_cnt)
+            straintot)
 
    is_plastic=is_plastic.or.is_plastic_temp