Updated the way document id is propagated