Updated document visibility for proper serialization