Fix bad class names in QueryItem template