Fix deprecated syntax in template files