Fix "selected" tab function and styles