fix extra endfor tag