bug fix for WireItem.revert; the wrong indices were considered