fixed distributed query hang when query is canceled (e.g. limit command)