Fix events not defined