Fix send() function