Change update by findAndModify and fix the error when updating was not w...

...orking on registerNode.