fix some bug,and write Createtemplate version 1