Correcting template ref