only listening to context loss event when context loss handling is enabled