fix exit criteria