Fix bug where context was not going through in documents.