Removed erroneous query generator