BUG:fix some bugs