Hello All,
This might be a little long but here goes. I adopted a 5 year old 2.7 pound Maltese named Max in late February. Max's story : he was at a shelter for an unknown amount of time and then fostered beginning in November 2010 up until I adopted him. In Max's foster home he lived with a dominant female Chihuahua who he got along wonderfully with. By all accounts (from Max's foster, who is my friend, and everyone who met him) Max was a sweet love machine, quiet, wonderful on a leash, LOVED people and was the perfect beginner dog! so after some consideration, I decided to meet Max. When I met him at his fosters house he was sweet and very friendly.
fast forward. I have now had Max for a little over two months. Max is very sweet and loving, he loves cuddles, walks great on a leash, loves to sleep and chew on his kong he is a very easy going dog. However, since I have gotten max, he has begun to act increasingly aggressive, both randomly and territorially (I think)

. it began with randomly charging at people and barking/growling/biting at them on walks. at first I thought he had a trigger, but after two months I have no idea, we could walk past 1000 people of all shapes, ages, etc, and he wouldn't bat a eye, but then someone walks by and he goes. this never happened with his foster. he is also biting at and barking at people when he's around me, which I'm assuming is protective/territorial behavior. Tt is so strange because he is so affectionate and loving, and then turns into a crazy beast. I should also mention that he has never acted aggressive with me at all. he also reaaally tiny, and is usually good with other dogs, unless there is food involved (but that's another issue). anyway it's really stressing me out, as I was expecting this wonderful nice little cuddle bug, and he is those things, but he also turns into a scary little monster. I would really love any advice on what I should do/what can help to correct this behavior. we are taking a beginner obedience class right now and are going on the 4th week, and while he is doing great, it has not improved his aggressive/biting tendencies. I really love Max and I want to be able to relax and have peace of mind when he is around other people because right now I am always on edge

. any suggestions are welcome!