handle freemarker tags properly