essential update

fix some bugs