Fix seletedTab issues