fix OOB error for send, and added Buffer send