fixed template problem