Changing send document to a dialog.
Fixed a crash when parsing.