Fixed another issue with the querybuilder in selecting the wrong type.