I like to come back to bad remarks by putting them on the spot. Such as, "Do you realize how incredibly rude that comment was?" or "Was it your intention to be that ill mannered?" Something that gets right to the point of their ignorant behaviour and holds them accountable.