utils.update fix
* Previous version modified the original object too soon, so that the
  update method didn't have the original values anymore.