92144a5
diff --git a/src/widget.c b/src/widget.c
92144a5
index 280575a..bf052cd 100644
92144a5
--- a/src/widget.c
92144a5
+++ b/src/widget.c
92144a5
@@ -1492,12 +1492,12 @@ show_hist (GList ** history, Widget * widget)
92144a5
         entry->text = NULL;
92144a5
     }
92144a5
 
92144a5
-    destroy_dlg (query_dlg);
92144a5
-
92144a5
     /* restore history direction */
92144a5
     if (query_dlg->y < widget->y)
92144a5
         z = g_list_reverse (z);
92144a5
 
92144a5
+    destroy_dlg (query_dlg);
92144a5
+
92144a5
     g_list_foreach (*history, (GFunc) g_free, NULL);
92144a5
     g_list_free (*history);
92144a5
     *history = g_list_last (z);
92144a5
@@ -2751,9 +2751,7 @@ listbox_key (WListbox * l, int key)
92144a5
 static inline void
92144a5
 listbox_destroy (WListbox * l)
92144a5
 {
92144a5
-    /* don't delete list in modifable listbox */
92144a5
-    if (!l->deletable)
92144a5
-        listbox_remove_list (l);
92144a5
+    listbox_remove_list (l);
92144a5
 }
92144a5
 
92144a5
 static cb_ret_t