fixed template glitch