Fixed no selected tab bug