correct two bugs in ui