Fix event manager
Condition for documents