fix query cancel problem