Overturned by who?
See my tagline.
Read the Twelfth Amendment.
In 1876 the election was decided _one_ _day_ before the expiration of President Grant’s term.
One day.
I leave it as an exercise for you to figure out how that happened...
Hint—the state certifications didn’t mean squat.