fix document state field