fix some bugs

fix some bugs