fix bug.the opened document, that don't close first document .