Bug fix for dealing with REST server failure