had a similar issue lately
I had 19 kps in the KP bar, and the timer went to 0, bringing the total to 20
I tried to give 20 kps into a fellow's wonder, but got an internal error
trying manually, I only got the error on the last KP
finally, I bought a kp with gold and could add it to the wonder...