I had the same problem in previous marriages of being attracted to or thinking of having sex with men other than my husband. Interestingly, all were "wrong" marriages, although I tried to convince myself otherwise.
Now that I'm married to someone who is truly the right match for me, on all levels, someone I don't find myself rationalizing about or justifying my reasons for being with him, I don't have the problem any more. He just rocks my world and I don't have the least interest in 'testing' anyone else out. =)