fixed the bug of wrong number of shared memory peer