improve setting UI logic