Fix bug for setting records/JSONObject