diff --git a/Solver/linearSystemGMM.h b/Solver/linearSystemGMM.h
index 96072966fb607e539de21571a283eeff21d4e61a..cde07c123efca2924f20923ca9af5c11e077df47 100644
--- a/Solver/linearSystemGMM.h
+++ b/Solver/linearSystemGMM.h
@@ -94,8 +94,8 @@ class linearSystemGmm : public linearSystem<scalar> {
     double nor = 0.;
     double temp;
     for(unsigned int i=0;i<_b->size();i++){
-      temp = (*_b)[i];
-      if(temp<0) temp = -temp;
+      temp = abs((*_b)[i]); // this is valid also for complex
+      //if(temp<0) temp = -temp;
       if(nor<temp) nor=temp;
     }
     return nor;