Fixed QueryTest