fix initial state
improve behavior when user tabs