diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index 8762bec..451af89 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -238,8 +238,9 @@ class Query():
                        tracker:available ?available . }
             FILTER ( (STRSTARTS (?url, '%(music_dir)s/') && ?available) ||
                       !BOUND(nfo:belongsToContainer(?playlist)) )
+            OPTIONAL { ?playlist nao:hasTag ?tag }
         }
-    ORDER BY LCASE(?title)
+    ORDER BY !BOUND(?tag) LCASE(?title)
     '''.replace('\n', ' ').strip() % {
             'where_clause': where_clause.replace('\n', ' ').strip(),
             'music_dir': Query.MUSIC_URI
diff --git a/libgd b/libgd
--- a/libgd
+++ b/libgd
@@ -1 +1 @@
-Subproject commit a0717ad8c078c07ea9d10aed385d30198fd24b03
+Subproject commit a0717ad8c078c07ea9d10aed385d30198fd24b03-dirty
