Fixed template loading bug in base controller.