repair thread numbering