Fix order of documents