I agree btw about nuetering, everybody thinks that is the answer but I personally own an 11yo pitt mix intact that has never humped and only did what your describing once in someone else's house. He did a 90minute downstay after that one and has never done it since.
He came into this world intact and unless there is a problem thats the way he will leave it. ;f