Fixed tab selection changed bug