Minor changes in peer connect code