fixed internal error when queries contain only white space