Fix 'run once' event and reset global data on restart