fix document status not saving