Fixed mem leak and added special send test cases