Change how events are registered