fix list compr. bug in template due to a change in jinja2