Fix bug in Newton-iteration minimizer