bugfixes for document created by webservices