make it show info at template and fix some notice.