diff --git a/src/wrap-interactive.c b/src/wrap-interactive.c
index 946f3a98e509bb35618fec427ebbccd3a57adc1d..9628412cabe765995f8d7797fb19b375aa163702 100644
--- a/src/wrap-interactive.c
+++ b/src/wrap-interactive.c
@@ -54,7 +54,7 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command,
       "echo\n"
       "echo\n"
       "echo\n"
-      "echo \"$1: Starting interactive shell (original command is in "
+      "echo \"$prgname: Starting interactive shell (original command is in "
       "\\\"\\$@\\\")\"\n"
       "echo\n"
       "echo\n"
@@ -86,7 +86,7 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command,
       case PV_SHELL_FAIL:
         script =
           "if \"$@\"; then exit 0; else e=\"$?\"; fi\n"
-          "echo \"$1: command exit status $e\"\n";
+          "echo \"$prgname: command exit status $e\"\n";
         break;
 
       case PV_SHELL_INSTEAD:
@@ -105,9 +105,9 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command,
                           "sh", "-euc",
                           command,
                           "sh",   /* $0 for sh */
-                          g_get_prgname (),   /* $1 for sh */
+                          g_get_prgname (),   /* $1 = $prgname for sh */
                           /* Original command will go here and become
-                           * the argv of command, and eventually
+                           * the rest of the argv of command, and eventually
                            * the argv of bash -i -s */
                           NULL);
 }