fix query