fixed template issues