fix some some bugs