'Document' compatibility hack