Index: trunk/FACT++/src/spectrum.cc
===================================================================
--- trunk/FACT++/src/spectrum.cc	(revision 19980)
+++ trunk/FACT++/src/spectrum.cc	(revision 19981)
@@ -906,6 +906,5 @@
     //    query3.template_defaults[it->first.c_str()] = it->second.c_str();
 
-    if (!where_sim.empty())
-        query3.template_defaults["where"] = ("AND\n      "+where_sim).c_str();
+    query3.template_defaults["where"] = where_sim.empty()? "" : ("AND\n      "+where_sim).c_str();
 
     if (print_queries)
