fix crash on internet loss