Fixed the worst issues with template-scope