Fixed dialogs so errortext is cleared when dialog closes.