“Thank you.
Coming from you, I consider it a complement.”
No, no, thank you, for confirming my theory (that you are a jerk).
If pointing out your error makes me a jerk, then I'm guilty as charged.
A better person would acknowledge he made a mistake.