Fix 'Unexpected closing template tag' error