fixed some template rendering.