fix some bugs and change some template
change templates