Bugfix: Ensure that all property values are kept when converting to Document

This closes #44