DEV: Small fixes in Newton Raphson