fixed tempalte
simple fixes to the template generation