diff --git a/.gitmodules b/.gitmodules
index b68dccb93a332e90e7a3a15d2da6e4b3a3b629b7..15d21c666c6d5871a0d50c16106f1ed18d7a2e20 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -6,7 +6,7 @@
 	url = https://github.com/pd-l2ork/cwiid
 [submodule "Gem"]
 	path = Gem
-	url = https://git.purrdata.net/jwilkes/Gem.git
+	url = https://git.purrdata.net/aggraef/gem.git
 [submodule "l2ork_addons/raspberry_pi/disis_gpio/wiringPi"]
 	path = l2ork_addons/raspberry_pi/disis_gpio/wiringPi
 	url = https://git.purrdata.net/jwilkes/wiringPi.git
diff --git a/Gem b/Gem
index 438dab32831090c2d2cddb71d6a3219622623484..53e3be2faf3d7d555ddae8f5d97e14449446b1b0 160000
--- a/Gem
+++ b/Gem
@@ -1 +1 @@
-Subproject commit 438dab32831090c2d2cddb71d6a3219622623484
+Subproject commit 53e3be2faf3d7d555ddae8f5d97e14449446b1b0
diff --git a/pd/src/m_glob.c b/pd/src/m_glob.c
index b3ed14c9fe2315bc46b184112ffadfe20bfd95c1..3efde149b1e44e49cf33de51ab766602559cd4a5 100644
--- a/pd/src/m_glob.c
+++ b/pd/src/m_glob.c
@@ -31,6 +31,7 @@ void glob_midi_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
 void glob_midi_setapi(t_pd *dummy, t_floatarg f);
 void glob_start_path_dialog(t_pd *dummy, t_floatarg flongform);
 void glob_path_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
+void glob_addtopath(t_pd *dummy, t_symbol *path, t_float saveit);
 void glob_start_startup_dialog(t_pd *dummy, t_floatarg flongform);
 void glob_startup_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
 void glob_ping(t_pd *dummy);
@@ -168,6 +169,8 @@ void glob_init(void)
         gensym("start-path-dialog"), 0);
     class_addmethod(glob_pdobject, (t_method)glob_path_dialog,
         gensym("path-dialog"), A_GIMME, 0);
+    class_addmethod(glob_pdobject, (t_method)glob_addtopath,
+        gensym("add-to-path"), A_SYMBOL, A_DEFFLOAT, 0);
     class_addmethod(glob_pdobject, (t_method)glob_start_startup_dialog,
         gensym("start-startup-dialog"), 0);
     class_addmethod(glob_pdobject, (t_method)glob_startup_dialog,
diff --git a/pd/src/s_path.c b/pd/src/s_path.c
index 321757a5b61c6cc40092e49811066e5e65d08c0d..e7ac2b1ecb8c18937772e7c99b408647333cc252 100644
--- a/pd/src/s_path.c
+++ b/pd/src/s_path.c
@@ -802,6 +802,22 @@ void glob_path_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv)
     }
 }
 
+    /* AG 20190801: add one item to search path (backported from
+       vanilla rev. c917dd19, to make GEM happy). */
+void glob_addtopath(t_pd *dummy, t_symbol *path, t_float saveit)
+{
+  t_symbol *s = sys_decodedialog(path);
+  if (*s->s_name)
+  {
+    sys_searchpath = namelist_append_files(sys_searchpath, s->s_name);
+    if (saveit) {
+      /* AG: We just ignore this flag for now, later maybe save the
+         preferences here. GEM doesn't need this, and we don't use
+         Deken, so we can do without this. */
+    }
+  }
+}
+
     /* start a startup dialog window */
 void glob_start_startup_dialog(t_pd *dummy)
 {