Small bug fixes

- Fix csv encoding.
- Modified content_rules patch