fix the tab selection