solve some bugs

solve some bugs