Kenya's electoral commission has said that a computer bug is to blame for a large number of rejected votes in the tallying of the presidential election.
Issack Hassan said the computer was multiplying each rejected vote by a factor of eight.
This led to huge disputes and allegations of fraud.
Vote-tallying has been restarted by hand following this and other glitches but Uhuru Kenyatta still has a large lead over Prime Minister Raila Odinga.
"There was an error in the way the program was written," said Mr Hassan.
"For any rejected vote for any candidate, they were being multiplied by eight," said the Independent Electoral and Boundaries Commission (IEBC) chairman.
The number of rejected votes has fallen dramatically from more than 330,000 - 6% - during an initial count, to 58,644.
With about six million votes tallied at 1515 GMT (1815 Nairobi time), Mr Kenyatta had some 3.1 million votes (53%) compared to Mr Odinga's 2.6 million (43%).
But, as turnout was estimated at more than 70% of the country's 14.3 million voters, there is still some way to go.