How exactly does King selection work?

I’ve been somewhat confused about this for a while now, but how exactly is it determined who will become the King after the votes are made? As you can see in the screenshot i attached, there were 2 candidates for King (12 was phys and 1 was reaper) and 1 got selected as King despite both getting 2 votes (while logically king shouldn’t be selected at all in this situation). 15 was reaped I’m pretty sure.
It’s actually 2nd time I encounter exactly this situation with 5 people and 2 candidates. Also, in another game I clearly remember seeing a person getting more votes than all of his opponents and nobody becoming king (dont remember specifics, though).
So what are precise mechanics of election?

20180217155608_1

That should have been a tie.

Usually when the election is tied, one the next day is held, and if that fails, there is no more King for the rest of the game.

Probably a bug.