fix copy/paste problem with templates