to_json correction