small bug fixes for sending