Change DynamicQueryDistribution into QueryDistribution