Fix general bugs in template files

Change-Id: Iecb2cbc51851e0fddda3bced03d164447674d6e4
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>