Fix how the custom event is only needed on <= 2.6