fix issue in testUpdateDocument