fixed some template stuff