fix crash when you leave the connection fragment