fixed template nesting