Fix bug and adjust UI.