fix has many queries