fix DEBUG=2
Fix match query if no query is present.  Found by benno@