diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp
index 89c15b3d16d34994f0ddb1742fc7e7dd0eb1e2c0..236084ebb6a3db80a33e08e48d5e308bad2bb6dc 100755
--- a/src/freedombone-app-xmpp
+++ b/src/freedombone-app-xmpp
@@ -181,29 +181,22 @@ function xmpp_remove_onion_address_interactive {
 }
 
 function configure_interactive_xmpp {
+    W=(1 $"Add an ICANN to onion domain mapping"
+       2 $"Remove an ICANN to onion domain mapping")
+
     while true
     do
-        data=$(mktemp 2>/dev/null)
-        dialog --backtitle $"Freedombone Control Panel" \
-               --title $"XMPP" \
-               --radiolist $"Choose an operation:" 12 70 3 \
-               1 $"Add an ICANN to onion domain mapping" off \
-               2 $"Remove an ICANN to onion domain mapping" off \
-               3 $"Return to administrator control panel" on 2> "$data"
-        sel=$?
-        case $sel in
-            1) rm -f "$data"
-               return;;
-            255) rm -f "$data"
-                 return;;
-        esac
-        case $(cat "$data") in
+        # shellcheck disable=SC2068
+        selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"XMPP" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
+
+        if [ ! "$selection" ]; then
+            break
+        fi
+
+        case $selection in
             1) xmpp_add_onion_address_interactive;;
             2) xmpp_remove_onion_address_interactive;;
-            3) rm -f "$data"
-               break;;
         esac
-        rm -f "$data"
     done
 }