Fix for extending templates