fixed bug in send_to_all member function