Tellurium has 52 protons and iodine has 53, so the order is correct.
In the time of Mendeleev, the atomic number was not discovered yet, so the inversion of the order of these elements was appointed as a weakness of his periodic table. It simply looked an artificial manipulation. The same happens also with cobalt and nickel.
The explanation of this inversion is that tellurium has several isotopes with 68 to 78 neutrons, being the isotopes with 76 and 78 neutrons the most abundant. Iodine has only one stable isotope with 74 neutrons.