Changed query template