fixing some bugs in s_udp + example