fix context aggregation in export mode