Fix query initialization


[ci skip]