fortran to c++ conversion had introduced a bug. Fixed.