[FIX] Prevent algorithm stopping when converging.

Before, the algorithm was stopping without saving any output when it
converged. This commit should solve this problem.