fix some css and jinja2 bugs