some bugs fix.