fixes a bug with backwards compatibility of the pore constraint in the lb
Clean C++ maximum of a double.