Fixed Document() to accommodate single-page document objects.