Fixed a bug in processJSONs