A number of dog training problems can be explained by your dog having an excess of energy, think about it yourself, if you have been sitting down all day what you really want to do is stretch and burn off some of the excess energy.
It is the same for your dog if it is left alone or not exercised before you go out it may burn off the excess energy by running around your home, this and other interesting points are discussed in an interesting post over here
What are your experiences with over energised dogs? Leave me a comment and I will reply
Talk soon
Sarah