Code for termination event is actually correct now, let's see if it works