Fixed error in iterative refinement stopping condition