fix error w/ empty query