fix a crash that happens in transport on session destroy