fixed template stuff