fixed auto query clause