fix app crash when the json is not available