fixed some issues with sending