Fixed bug for multiple query nodes