fix in detailed conditions query