Correct the correspondence between name_arr and the input codes.