I'm very careful about what I say about DS's father when he's around. He'll learn soon enough that dad isn't that great. He's only four and will ask what the no smoking sign means. I tell him that we think smoking is icky and he mentions that his dad smokes (only outside. He did that before we were married). He already sees the little differences in our households.
I'm sorry if it sounded like I thought you weren't being careful. I didn't mean that at all. I just have very strong feelings on this and am dealing with trying to help a friend through her divorce with a similar issue. It's great that you're already that aware of it. I can promise that it'll make an impact. Especially if your ex is ever stupid enough to say something about you in front of your son. At 8 yrs old, I told my dad to take me home early one weekend because he'd said something about my mom. As you can see, it had a big impact that he talked about her and she didn't talk about him. Long way around to say keep it up.