Fixed some small bugs. Tested with YAML, Json and Jinja2 as renderers.