and fix the use-after-free crash in RT #97625