Fixed uncaught exception, if API is down.