Fixed UI logic.