fix session lost when session is not opened due to add exception