fix #7 error when document has no body