fix error
fix some bugs