just fix some bugs