find some bugs, need to fix.