Fixed for templatesystem
Fix for templatesystem