handle unit indices changing when deleting multiple paths in the same event