Reconnect socket and other changes