fixing disconnection problems