fix subcat qry