Fix for events not being registered