more fixes with the templates