correcting template issues