Fix tab reordering issue