Fix some jinja variable problems