fix query api