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 chairman of the Independent Electoral and Boundaries Commission (IEBC) chairman.Dramatic fall
"For any rejected vote for any candidate, they were being multiplied by eight," Issack Hassan said.
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.
The Jubilee coalition has rejected calls for some of the rejected ballots to be included, as requested by Mr Odinga's allies.
Counting the rejected votes would greatly add to the number needed for a candidate to break the 50% threshold for a first-round win and increase the prospect of a runoff due within a month.
The IEBC chairman announcement came as the running mate of Mr Odinga, Kalonzo Musyoka, said they had evidence that the results had been doctored and called for vote-counting to be stopped.
The allegations were denied by Mr Hassan who said there was "no room whatsoever" for results to be doctored.
He rebuffed calls for the ongoing count to be stopped, saying it was a legal process.
Meanwhile, the International Criminal Court has postponed the trial of Mr Kenyatta, initially due to begin next month, on charges of crimes against humanity.
He is accused of organising attacks on members of ethnic groups seen as supporters of Mr Odinga during post-election violence in 2007-2008. He denies the charges.
The trial is now due to begin on 9 July 2013.