fix query processor