To prevent this from happening in future, the law need to be changed so that a candidate for any public office must win more than 50% of the votes to be elected.
That a man who only wins only around 30% accepts the office not only lower respect for the position, it reflects poorly on his character.