fix `query` undefined during `LOG_QUERIES=true`