Fix headers in send_payload function