fix for templates