fix query type