fixed error in simplex minimizer