Fixed jinja environment bug