Fixed bug in update document

Fixed error where userName would not update