Fixing server disconnection