Fixed checking of zero length in sendto