fix bug of document