Fixed minor bug with tab selection