fix some bugs important