Fix capi query checker