fixed runtime issues in json_api