Fixing on template errors