post receives before send, fix memory leaks