whirling around , the dog tensed , and for a second , she thought it was going to come for her after all , but then the dog was pivoting on its hind legs and sprinting away , barking as it followed the girl 's voice .