to_json fix