fix query reference name