fix canonicalquery