Fixed a problem with document update.