Always let your dog know when you are comfortable with a newcomer. Pet them, while saying hello to the newcomer and your pet will learn when YOU feel safe - your behavior will let them know that it is okay. Dogs will protect their own and do sense when you are uneasy (not that you were). I would just get in the habit of letting my dog know when things were okay - trained dogs are VERY keen and usually a better judge of character than we are.