Fix problems with listener registration / activation.