some bugs fix