fix validation errors on document creation