fix some bugs about UI