that dog is fear aggressive, he was ready to attack out of fright, he saw you comming and ran scared, but you kept on comming and he felt the need to protect himself, chances are he was only threatning, he stopped because he turned and went the other way, so now he felt safe again. anyway I just have plenty of personal experience with fear aggressive dogs lol