Fix a problem with the abs() in KMat.hpp