Modify Transition.prototype.terminate