fix query format