Fix few bugs of update ui;