Fix argument names in Document to avoid collisions