When you are outed doing something stupid, just admit it, apologize if necessary, and move on. A few people will take their pot shots, the issue will die, and life will go on. What you shouldn't do is double down on something you know was stupid. That only encourages people. It's like waving a red flag.
Stupid + Stupider = Stupidest