fix repeat-until bug