Fix for documents with image.