Added document to End()