fix typing on CompoundQuery