Fix document structure