diff --git a/src/files.c b/src/files.c
index af78b33f75761780c33def00393b7efd3d1e474c..88ba0fc47c68ae56ebe51368fab94f54400a5b31 100644
--- a/src/files.c
+++ b/src/files.c
@@ -952,6 +952,7 @@ void do_insertfile(
 	    break;
 	}
     }
+    shortcut_init(FALSE);
 
     free(ans);
 }
diff --git a/src/nano.c b/src/nano.c
index 010c721b2a9cfbef6b20a6ce730aa3f67ec6cbf1..566c53421069b23ca83c41d3e9f936ca34fdc4a6 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1010,6 +1010,7 @@ void do_exit(void)
     } else if (i != 1)
 	statusbar(_("Cancelled"));
 
+    shortcut_init(FALSE);
     display_main_list();
 }