fixed bug when sending message to multiple peers