Fix crash when transport goes away