Added stagnation limit criterion.