fixing document structure