Inappropriate jokes

A family member is racist and homophobic, and makes inappropriate jokes. This has been going on for years and I've always tried to explain why it's not funny, not acceptable, why it's offensive and hurtful. Now I have a baby son, andI don't want my son to be exposed to that way of thinking! Yesterday this person said to my baby son "You're looking good in that shirt with your hair combed, but don't worry I'm not hitting on you - I'm not gay" I said, don't say stuff like that to him, but they just laughed and said only joking. Uggh! What should I say/do to stop this?