fixed the bug where the convergence flag is not set.