fixed SQL syntax error on AND conjunction of multiple tags