Fixing up the event system