Change syntax for tags WHERE clause