Fixed the ui bug