Fixed some issues with the base template.