I'm glad you were pleased. I always 'call out' things like this. It's a terrible fault on behalf of the trainer to take advantage of being in a superior position as a teacher to be thoughtless. Try saying, very calmly, "I know you are just joking, but it would help my confidence if you didn't do/say things like that. Would that be ok?". If the instructor brushes it off with "just a joke!" just keep a straight, neutral face, and say "all the same, if you wouldn't mind".