bugfix of template