fix context issue for entry and exit nodes