fix some bugs and redesign module