fixing reference to template