Fixes issue to reconnect to a server.