some changes to fix when the server is not reachable.