changed Fragment references into weak reference & added connection availalbility check