Added fix for template when no extensions