(BLuefox) fix error if document has no data