Some changes to code starting peer scanning