Fixing issues with templating and not syntactically correct elements.