fix query names