use the same fix for template files