Solved issue of locking when only one peer, and did ping improvements