bug fix for blank queries