Issue query perf improvements

The number 0 is missing on automatic tests here.