modify some code of ui.