CFY-1272 fixed template generation