diff --git a/update-gluon.sh b/update-gluon.sh
index aab2145269e352ac793071443a8940562cb86c8e..f126b164281216ccaf8e42e139dc9e705f85689a 100755
--- a/update-gluon.sh
+++ b/update-gluon.sh
@@ -41,8 +41,8 @@ cd site-ffs
 git checkout nightly
 
 git -C gluon fetch
-git -C gluon checkout $new_gluon_rev
 git -C gluon submodule update
+git -C gluon checkout $new_gluon_rev
 
 git add gluon
 git commit -m "automatic update to gluon $fork_newest_minor_tag"