bug in hessian modification algorithm