Fixed potential crash on disconnect event trigger