Fixed bug when multiple smart templates exist in a project.