Fixes crash when getting an invalid response.