Fixed little bugs in templates.