TUI: fixed some issues with TUI