[Editor] Fixed closing documents.