fix some bugs, can't work