Fix not registering events