fix unblocking issue when multiple queries are executed