fix query fields