runquery bug fix