fixin to_json issue