reset the object when editing is canceled