Fix number of things with template rendering.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Merge pull request #1094 from kwilczynski/master

Fix number of things with template rendering.