You just have to stop thinking about her when it becomes inappropriate. Think about it this way... what if you had a wife and someone was thinking about her that way? How would you feel?
I would be mad at them if they came and told me they were thinking about my wife. But I'm not going to tell Celine or LeAnn that I'm thinking about them in that way.