working around Jinja bugs