Correction for a bug in dialog loops.