Fixes premature exit from Newton Raphson

Would never try another attempt with that if inside while loop!