Fixed some template issues.