--- a/src/mediaserver/cdplugins/plgwithslave.cxx
+++ b/src/mediaserver/cdplugins/plgwithslave.cxx
@@ -532,6 +532,7 @@
                        || beginswith(what, "object.container.playlist")) {
                 objkind = "playlist";
             }
+            classfilter = what;
         } else if (!upnpproperty.compare("upnp:artist") ||
             !upnpproperty.compare("dc:author")) {
             slavefield = "artist";
@@ -545,8 +546,6 @@
             slavefield = "track";
             value = vs[i+2];
             break;
-        } else if (!upnpproperty.compare("upnp:class")) {
-            classfilter = vs[i+2];
         }
     }
     if (slavefield.empty()) {
@@ -558,7 +557,7 @@
     SearchCacheEntry *cep;
     string cachekey(m_name + ":" + objkind + ":" + slavefield + ":" + value);
     if ((cep = o_scache.get(cachekey)) != nullptr) {
-        int total = resultFromCacheEntry(classfilter, stidx,cnt, *cep, entries);
+        int total = resultFromCacheEntry(classfilter, stidx, cnt, *cep, entries);
         delete cep;
         return total;
     }