Fix events import code