fixing bug in peer