fixed bugs in update-dialog.js. references to objects were kept instead of cloning them