fixes for initialising the templates