fix some bugs
Cleanup connections code in msg_pingpong