Fix some template glitches.