nmax bug
ML using new error parameterization