Fixed an issue with the queryobject