Handled case when tabs were reordered manually