Added treatment for JSONException