ENH:fix some bugs