fix bugs in UI