Fixed issue with tab selection