consolidated query: bug fix