Update terminate and references