Test queries helper patch