o Fix the order of the events emited for incoming documents.