fix bugs

fix some bugs