fix query causing weird test exec failures

Before fix, the query would return an empty result set !