better event handling for restart button