Fixed a bug that produced a new insertion after each update of an object.