Bug fix for case without templates.