need a barrier between query_container and close_container