Added correct handling of server failure
Correct a typo