You have to be consistent when housebreaking a stubborn dog. Taking him out at regular times is very important. If he messes in the house when you are away, try putting him in a crate or kennel while you are gone. Dogs usally don’t mess in their own space. Take him out as soon as you get back and praise him for doing his business outside. He will get the idea really soon!