Fix the events not being registered.