Fixed so that you can set null selectedTab