Ugly fix for document_hash