fixed none-closed {% if %} statements