So my dog is a very, very nice dog if he knows the person. He is very friendly and loving but if for example I tie him outside a store while I go in quick and someone tries to pet him he will either show his teeth or try to bite the person, only when a stranger tries to pet him. He usually doesn't really bites but gives a warning sign but today he bit someone, I don't know if the person tried to pet him (people should ask the owner in the first place). I found him on the streets and I think maybe he was abused when little and that's probably why he is like that to strangers. What can I do to keep him from being like that?