correct layout for documents, fixes #71