add fix some bugs