Fixed possible scoping issues in the TabBar.