It was a backhanded compliment. He might have intended to mean well, but he gave a backhanded compliment.
It's not a crime to say, "You know what, that didn't come out the way I intended."
We've all had moments like that. It's ok to admit them and move on.