fixed the wrong index of peer