solve some bugs