Fix number of things with template rendering.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>