fix crash when leaving/reentering chat room