Changing the state if TAB as well