Fix string formatting of numbers in templates.