fixed some bugs with global peer map first-run code